Skip to content

Commit e44ae30

Browse files
authored
Patch TLS update to 1.2 earlier (#52)
Fixes #51.
1 parent 79a9c02 commit e44ae30

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ static partial void Wain(IEnumerable<string> args)
102102

103103
var queries = GetQueries(tail, recurse);
104104

105+
// See also: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
106+
const SecurityProtocolType tls12 = SecurityProtocolType.Tls12;
107+
if ((ServicePointManager.SecurityProtocol & tls12) != tls12)
108+
ServicePointManager.SecurityProtocol |= tls12;
109+
105110
// TODO Allow packages directory to be specified via args
106111

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

361366
foreach (var nr in nrs)
362367
{
363-
// See also: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
364-
const SecurityProtocolType tls12 = SecurityProtocolType.Tls12;
365-
if ((ServicePointManager.SecurityProtocol & tls12) != tls12)
366-
ServicePointManager.SecurityProtocol |= tls12;
367-
368368
var version = nr.Version;
369369
if (version == null)
370370
{

0 commit comments

Comments
 (0)