Skip to content

Commit 2d5cde2

Browse files
committed
Check if cert export is needed.
1 parent b457f5e commit 2d5cde2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,6 @@ public async Task InsecureRegistry(bool serverIsHttps, bool isInsecureRegistry)
416416
var request = new CertificateRequest("CN=localhost", key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
417417
X509Certificate2 serverCertificate = request.CreateSelfSigned(DateTimeOffset.Now, DateTimeOffset.Now.AddYears(1));
418418

419-
// https://stackoverflow.com/questions/72096812/loading-x509certificate2-from-pem-file-results-in-no-credentials-are-available/72101855#72101855
420-
serverCertificate = new X509Certificate2(serverCertificate.Export(X509ContentType.Pfx));
421-
422419
sslOptions = new SslServerAuthenticationOptions()
423420
{
424421
ServerCertificate = serverCertificate,

0 commit comments

Comments
 (0)