From a41f64dab6316b67c6cac9fba90d354bdb94de64 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 26 Feb 2019 22:41:05 -0800 Subject: [PATCH] enable GetAsync_AllowedSSLVersion_Succeeds for SocketHttpHandler (dotnet/corefx#35605) * enable GetAsync_AllowedSSLVersion_Succeeds for SocketHttpHandler and skip Curl on RH6 Commit migrated from https://github.com/dotnet/corefx/commit/f44142b855330ca9274827a230b8ad9a3ccda357 --- .../HttpClientHandlerTest.SslProtocols.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs index a0f714fc868..9332ae099de 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs @@ -9,6 +9,7 @@ using System.Net.Test.Common; using System.Runtime.InteropServices; using System.Security.Authentication; using System.Threading.Tasks; +using Microsoft.DotNet.XUnitExtensions; using Xunit; namespace System.Net.Http.Functional.Tests @@ -91,7 +92,6 @@ namespace System.Net.Http.Functional.Tests #pragma warning disable 0618 if (PlatformDetection.SupportsSsl3) { - // TODO #28790: SSLv3 is supported on RHEL 6, but this test case still fails. yield return new object[] { SslProtocols.Ssl3, true }; } if (PlatformDetection.IsWindows && !PlatformDetection.IsWindows10Version1607OrGreater) @@ -109,7 +109,7 @@ namespace System.Net.Http.Functional.Tests #endif } - [Theory] + [ConditionalTheory] [MemberData(nameof(GetAsync_AllowedSSLVersion_Succeeds_MemberData))] public async Task GetAsync_AllowedSSLVersion_Succeeds(SslProtocols acceptedProtocol, bool requestOnlyThisProtocol) { @@ -118,11 +118,13 @@ namespace System.Net.Http.Functional.Tests return; } - if (UseSocketsHttpHandler) +#pragma warning disable 0618 + if (IsCurlHandler && PlatformDetection.IsRedHatFamily6 && acceptedProtocol == SslProtocols.Ssl3) { - // TODO #26186: SocketsHttpHandler is failing on some OSes. - return; + // Issue: #28790: SSLv3 is supported on RHEL 6, but it fails with curl. + throw new SkipTestException("CurlHandler (libCurl) has problems with SSL3 on RH6"); } +#pragma warning restore 0618 using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler))