Skip to content

Commit

Permalink
Merge pull request #1823 from sebastian-jtl/TLS13_support
Browse files Browse the repository at this point in the history
TLS 1.3 support
  • Loading branch information
robmen authored Jul 13, 2022
2 parents e298270 + 0ef729a commit 5ee2566
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Squirrel/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,15 @@ public static string CalculateStreamSHA1(Stream file)

public static WebClient CreateWebClient()
{
// WHY DOESNT IT JUST DO THISSSSSSSS
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
// enable TLS support
// TLS 1.0 and 1.1 are enabled for backward compatibility and should be disabled in the future
// for security reasons
ServicePointManager.SecurityProtocol |=
SecurityProtocolType.Tls12 |
SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls;
// disable SSLv3 support for security reasons
ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Ssl3;

var ret = new WebClient();
var wp = WebRequest.DefaultWebProxy;
Expand Down

0 comments on commit 5ee2566

Please sign in to comment.