You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Second Pkcs12Store necessary because of an obscure BC bug where creating a Pkcs12Store without .Load (code above using "Set" methods only) does not set all internal hashtables necessary to avoid an error later
@@ -94,6 +94,7 @@ public List<SerializedStoreInfo> SerializeRemoteCertificateStore(Pkcs12Store cer
94
94
thrownewRemoteFileException($"DER certificate store has a private key at {SeparatePrivateKeyFilePath}, but no private key was passed with the certificate to this job.");
95
95
}
96
96
97
+
// this still needs refactored to CryptographicObjectFormatter
// Second Pkcs12Store necessary because of an obscure BC bug where creating a Pkcs12Store without .Load (code above using "Set" methods only) does not set all internal hashtables necessary to avoid an error later
@@ -113,22 +113,21 @@ public List<SerializedStoreInfo> SerializeRemoteCertificateStore(Pkcs12Store cer
113
113
if(certificateStore.IsKeyEntry(alias))
114
114
thrownewRemoteFileException("Cannot add a certificate with a private key to a PEM trust store.");
thrownewRemoteFileException("Error retrieving private key. Certificate store password cannot have a non empty value if the private key is in PKCS#1 format (BEGIN [RSA|EC] PRIVATE KEY)");
130
128
131
129
boolkeyEntryProcessed=false;
130
+
//todo: why is this a foreach? seems like it either runs once or throws an exception
132
131
foreach(stringaliasincertificateStore.Aliases)
133
132
{
134
133
if(keyEntryProcessed)
@@ -140,39 +139,24 @@ public List<SerializedStoreInfo> SerializeRemoteCertificateStore(Pkcs12Store cer
140
139
thrownewRemoteFileException("No private key found. Private key must be present to add entry to a non-Trust PEM certificate store.");
@@ -52,7 +51,7 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
52
51
thrownewRemoteFileException($"Certificate store {config.CertificateStoreDetails.StorePath} does not exist on server {config.CertificateStoreDetails.ClientMachine}.");
0 commit comments