Workaround to support TLS 1.2 on Windows 7

This commit is contained in:
Jaex 2020-10-12 14:00:07 +03:00
parent abb65869cd
commit 6e53b787d3

View file

@ -58,6 +58,18 @@ public static void UpdateServicePointManager()
ServicePointManager.DefaultConnectionLimit = 25;
ServicePointManager.Expect100Continue = false;
ServicePointManager.UseNagleAlgorithm = false;
if (Helpers.IsWindows7())
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
}
catch (NotSupportedException)
{
DebugHelper.WriteLine("Unable to configure TLS 1.2 as the default security protocol.");
}
}
}
protected void OnProgressChanged(ProgressManager progress)