Skip to content

Commit

Permalink
Patch TLS update to 1.2 earlier (#52)
Browse files Browse the repository at this point in the history
Fixes #51.
  • Loading branch information
atifaziz authored Jan 1, 2021
1 parent 79a9c02 commit e44ae30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ static partial void Wain(IEnumerable<string> args)

var queries = GetQueries(tail, recurse);

// See also: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
const SecurityProtocolType tls12 = SecurityProtocolType.Tls12;
if ((ServicePointManager.SecurityProtocol & tls12) != tls12)
ServicePointManager.SecurityProtocol |= tls12;

// TODO Allow packages directory to be specified via args

const string packagesDirName = "packages";
Expand Down Expand Up @@ -360,11 +365,6 @@ LogHandlerSet CreateLogHandlers(IndentingLineWriter w) =>

foreach (var nr in nrs)
{
// See also: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
const SecurityProtocolType tls12 = SecurityProtocolType.Tls12;
if ((ServicePointManager.SecurityProtocol & tls12) != tls12)
ServicePointManager.SecurityProtocol |= tls12;

var version = nr.Version;
if (version == null)
{
Expand Down

0 comments on commit e44ae30

Please sign in to comment.