From 9317db0695918f74d8e2308bbe4c2f06cc3dea49 Mon Sep 17 00:00:00 2001 From: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:51:05 +0200 Subject: [PATCH] Cleanup certificates before running ConnectWithRevocation_WithCallback_Core on Windows (#104014) --- .../FunctionalTests/CertificateValidationRemoteServer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/CertificateValidationRemoteServer.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/CertificateValidationRemoteServer.cs index 588c2d3160b8c..7f06b26c97d86 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/CertificateValidationRemoteServer.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/CertificateValidationRemoteServer.cs @@ -196,6 +196,11 @@ private async Task ConnectWithRevocation_WithCallback_Core( (Stream clientStream, Stream serverStream) = TestHelper.GetConnectedStreams(); + if (PlatformDetection.IsWindows && testName != null) + { + TestHelper.CleanupCertificates(testName); + } + CertificateAuthority.BuildPrivatePki( PkiOptions.EndEntityRevocationViaOcsp | PkiOptions.CrlEverywhere, out RevocationResponder responder,