From 5d1c216846782b888eeeaaabce985ab325b8b8ca Mon Sep 17 00:00:00 2001 From: James Trinklein Date: Thu, 22 Feb 2018 13:08:32 -0800 Subject: [PATCH 1/2] fix: use tls1.2 for WebProxyRequests --- src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs b/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs index fb15aa0ca0..5d7c130f87 100644 --- a/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs +++ b/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs @@ -7,6 +7,7 @@ public class WebRequestProxy : IWebRequestProxy { public WebRequestProxy() { + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; Client = new WebClient(); } From d118d7037d4624d9a269b0c7d8d705a0fe7c7fbf Mon Sep 17 00:00:00 2001 From: James Trinklein Date: Thu, 22 Feb 2018 15:59:14 -0800 Subject: [PATCH 2/2] chore: set security protocols at program startup instead of helper --- src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs | 1 - src/Paket.Bootstrapper/Program.cs | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs b/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs index 5d7c130f87..fb15aa0ca0 100644 --- a/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs +++ b/src/Paket.Bootstrapper/HelperProxies/WebRequestProxy.cs @@ -7,7 +7,6 @@ public class WebRequestProxy : IWebRequestProxy { public WebRequestProxy() { - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; Client = new WebClient(); } diff --git a/src/Paket.Bootstrapper/Program.cs b/src/Paket.Bootstrapper/Program.cs index d782cdef81..0dd7629703 100644 --- a/src/Paket.Bootstrapper/Program.cs +++ b/src/Paket.Bootstrapper/Program.cs @@ -13,12 +13,17 @@ namespace Paket.Bootstrapper { + static class Program { private static readonly Stopwatch executionWatch = new Stopwatch(); static void Main(string[] args) { + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 + | SecurityProtocolType.Tls11 + | SecurityProtocolType.Tls + | SecurityProtocolType.Ssl3; executionWatch.Start(); Console.CancelKeyPress += CancelKeyPressed;