From b9b4cdb3f9652f2d17fa7026d18ab00dcbddd2c7 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 5 Oct 2016 00:38:22 +0200 Subject: [PATCH] Revert "Fix Mono 4.8+" This reverts commit a261dc44fd88dbc894a47f4a3bd2bb222169c348. No longer needed, Mono switched to legacy TLS once again due to those issues. --- ArchiSteamFarm/Runtime.cs | 15 --------------- ArchiSteamFarm/WebBrowser.cs | 4 ---- 2 files changed, 19 deletions(-) diff --git a/ArchiSteamFarm/Runtime.cs b/ArchiSteamFarm/Runtime.cs index 6a1b67788..42f335c82 100644 --- a/ArchiSteamFarm/Runtime.cs +++ b/ArchiSteamFarm/Runtime.cs @@ -127,21 +127,6 @@ namespace ArchiSteamFarm { } } - // TODO: Remove me once BTLS in Mono 4.8+ is fixed - internal static bool RequiresNoCertificateValidation() { - if (!IsRunningOnMono) { - return false; - } - - Version monoVersion = GetMonoVersion(); - - if (monoVersion?.Major != 4) { - return false; - } - - return monoVersion.Minor >= 8; - } - private static Version GetNetVersion() { uint release; using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\")) { diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index 7829b02d3..2c02d91da 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -54,10 +54,6 @@ namespace ArchiSteamFarm { // Don't use Expect100Continue, we're sure about our POSTs, save some TCP packets ServicePointManager.Expect100Continue = false; - if (Runtime.RequiresNoCertificateValidation()) { - ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true; - } - #if !__MonoCS__ // We run Windows-compiled ASF on both Windows and Mono. Normally we'd simply put code in the if // However, if we did that, then we would still crash on Mono due to potentially calling non-existing methods