From e44ae301eaa8175df0d2bfff24ea2eed520a0016 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Fri, 1 Jan 2021 22:55:23 +0100 Subject: [PATCH] Patch TLS update to 1.2 earlier (#52) Fixes #51. --- src/Program.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Program.cs b/src/Program.cs index 7a569b0..a76e44c 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -102,6 +102,11 @@ static partial void Wain(IEnumerable 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"; @@ -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) {