winbench / bench

Portable Software Environment for Windows
https://winbench.org
MIT License
20 stars 3 forks source link

Download of app resource failes with SSL/TLS error #119

Closed mastersign closed 7 years ago

mastersign commented 7 years ago

The WebClient fails to establish some HTTPS connections.

mastersign commented 7 years ago

The reason is the default setting for the allowed security protocols in System.Net.ServicePointManager.SecurityProtocol. The static property supports the flag enum type System.Net.SecurityProtocolType wich currently contains the following members: Ssl3, Tls, Tls11, Tls12.

After setting ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 the former failing connections do work.

mastersign commented 7 years ago

There should be a configuration property of type list, which sets the allowed security protocols. The property could be named HttpsSecurityProtocols and should be parsed into the flag combination of the SecurityProtocolType enum.