Skip to content

HttpClient on net5 should fallback to TLS1.2 with Windows Insider builds #40679

@zivkan

Description

@zivkan

Description

I'm on the NuGet team, and several customers (internal and external) have reported problems doing a restore and being unable to connect to api.nuget.org. I created a gist to test using HttpClientHandler with various SslProtocols values: https://gist.github.com/zivkan/5291f507c8c5724d41a18357b7afcd30

Here NuGet's customers reported their results: NuGet/Home#9893 (comment)

We can see that SslProtocols.None, which is supposed to be "use operating system defaults" works on netcoreapp3.1, but fails on net5.0. Therefore it appears that net5.0 is no longer using TLS 1.2 by default.

Configuration

Please see the thread on NuGet/Home: NuGet/Home#9893 (comment)

Regression?

yes, customers report that it works on netcoreapp3.1, but not net5.0.

Other information

Explicitly configuring HttpClientHandler to use SslProtocols.Tls12 works for customers writing their own app, but it doesn't help customers trying to use NuGet when NuGet doesn't attempt to specify SslProtocols at all, leaving the default value.

@terrajobst was the first to report this problem to me, so if you need someone internal to help test/reproduce the problem, he might be able to help.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions