diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamRemoteExecutorTests.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamRemoteExecutorTests.cs index 87ec6605e37aad..46a4707b43cf01 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamRemoteExecutorTests.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamRemoteExecutorTests.cs @@ -25,6 +25,7 @@ public SslStreamRemoteExecutorTests() [PlatformSpecific(TestPlatforms.Linux)] // SSLKEYLOGFILE is only supported on Linux for SslStream [InlineData(true)] [InlineData(false)] + //[ActiveIssue("https://github.com/dotnet/runtime/issues/116473")] public async Task SslKeyLogFile_IsCreatedAndFilled(bool enabledBySwitch) { if (PlatformDetection.IsDebugLibrary(typeof(SslStream).Assembly) && !enabledBySwitch) @@ -34,6 +35,13 @@ public async Task SslKeyLogFile_IsCreatedAndFilled(bool enabledBySwitch) return; } + if (PlatformDetection.IsOpenSsl3_5 && !enabledBySwitch) + { + // OpenSSL 3.5 and later versions log into file in SSLKEYLOGFILE environment variable by default, + // regardless of AppContext switch. + return; + } + var psi = new ProcessStartInfo(); var tempFile = Path.GetTempFileName(); psi.Environment.Add("SSLKEYLOGFILE", tempFile);