File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,15 @@ public static string CalculateStreamSHA1(Stream file)
104
104
105
105
public static WebClient CreateWebClient ( )
106
106
{
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 ;
109
116
110
117
var ret = new WebClient ( ) ;
111
118
var wp = WebRequest . DefaultWebProxy ;
You can’t perform that action at this time.
0 commit comments