diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs index 811b6932e896de..caad41dc36456b 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs @@ -1135,6 +1135,11 @@ public async Task SslStream_UnifiedHello_Ok(bool useOptionCallback) [PlatformSpecific(TestPlatforms.Windows | TestPlatforms.Linux)] public async Task DisableUnusedRsaPadding_Connects(bool clientDisable, bool serverDisable) { + if (PlatformDetection.IsOpenSslSupported && !PlatformDetection.IsOpenSsl3) + { + throw new SkipTestException("OpenSSL 3.0 or later is required."); + } + (Stream client, Stream server) = TestHelper.GetConnectedTcpStreams(); using SslStream clientSslStream = new SslStream(client); @@ -1171,6 +1176,11 @@ public async Task DisableUnusedRsaPadding_Connects(bool clientDisable, bool serv [PlatformSpecific(TestPlatforms.Windows | TestPlatforms.Linux)] public async Task DisableUsedRsaPadding_Throws(bool clientDisable, bool serverDisable) { + if (PlatformDetection.IsOpenSslSupported && !PlatformDetection.IsOpenSsl3) + { + throw new SkipTestException("OpenSSL 3.0 or later is required."); + } + (Stream client, Stream server) = TestHelper.GetConnectedTcpStreams(); using SslStream clientSslStream = new SslStream(client);