Allow newer SSL/TLS protocol versions

Fixes [this issue](https://github.com/MCCTeam/Minecraft-Console-Client/discussions/1885#discussioncomment-3434649).
This commit is contained in:
Daenges 2022-08-20 11:55:42 +00:00 committed by ORelio
parent 19059414e8
commit b8f5909975

View file

@ -279,6 +279,12 @@ class HTTP
{ {
public static byte[] Post(string url, NameValueCollection pairs) public static byte[] Post(string url, NameValueCollection pairs)
{ {
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3;
using (WebClient webClient = new WebClient()) using (WebClient webClient = new WebClient())
{ {
return webClient.UploadValues(url, pairs); return webClient.UploadValues(url, pairs);