Make default SocketsHttpHandler SslProtocols include Tls11/12 on Win7/2008R2 (dotnet...
authorStephen Toub <stoub@microsoft.com>
Wed, 4 Apr 2018 16:59:09 +0000 (09:59 -0700)
committerGitHub <noreply@github.com>
Wed, 4 Apr 2018 16:59:09 +0000 (09:59 -0700)
commit6c551076f04f07d9586a4b69b18455afbb01ca44
tree11d0635861cbd5636825b0bb2644b07251b08793
parenteb5402ee64f88757f87e545abf2d423a88a5e600
Make default SocketsHttpHandler SslProtocols include Tls11/12 on Win7/2008R2 (dotnet/corefx#28788)

Windows 7 and Windows 2008 R2 support TLS 1.1 and 1.2, but for legacy reasons by default those protocols are not enabled when a developer elects to use the system default.  However, in .NET Core 2.0 and earlier, HttpClientHandler would enable them, due to being a wrapper for WinHTTP, which enabled them.  Both for compatibility and because we prefer those higher protocols whenever possible, SocketsHttpHandler also pretends they're part of the default when running on Win7/2008R2.

Commit migrated from https://github.com/dotnet/corefx/commit/0c7a1de0448c9dee76723d0bedd90f76c3436662
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs
src/libraries/System.Net.Security/tests/FunctionalTests/ClientAsyncAuthenticateTest.cs