Skip to content

Commit 5ee2566

Browse files
authored
Merge pull request #1823 from sebastian-jtl/TLS13_support
TLS 1.3 support
2 parents e298270 + 0ef729a commit 5ee2566

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Squirrel/Utility.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,15 @@ public static string CalculateStreamSHA1(Stream file)
104104

105105
public static WebClient CreateWebClient()
106106
{
107-
// WHY DOESNT IT JUST DO THISSSSSSSS
108-
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
107+
// enable TLS support
108+
// TLS 1.0 and 1.1 are enabled for backward compatibility and should be disabled in the future
109+
// for security reasons
110+
ServicePointManager.SecurityProtocol |=
111+
SecurityProtocolType.Tls12 |
112+
SecurityProtocolType.Tls11 |
113+
SecurityProtocolType.Tls;
114+
// disable SSLv3 support for security reasons
115+
ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Ssl3;
109116

110117
var ret = new WebClient();
111118
var wp = WebRequest.DefaultWebProxy;

0 commit comments

Comments
 (0)