mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Workaround to support TLS 1.2 on Windows 7
This commit is contained in:
parent
abb65869cd
commit
6e53b787d3
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue