From 7a677ef3c6a48a2cba5f35da7d879cec2539cdf2 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 9 Dec 2018 16:07:48 +0100 Subject: [PATCH] Re-enabling TLS/SSL and seeing what breaks --- Logic/Support/General.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Logic/Support/General.cs b/Logic/Support/General.cs index 642b8ec6..e964a4a1 100644 --- a/Logic/Support/General.cs +++ b/Logic/Support/General.cs @@ -15,8 +15,17 @@ namespace Swarmops.Logic.Support { public static void DisableSslCertificateChecks() { - // X.509 is SO SO SO broken. The reason we do this, btw, is that mono doesn't come with root certs. At all. + // 2018-Dec-01: We're now requiring the freshest Mono repositories to be installed with Swarmops, and this DOES + // force a cert repository to be installed (at long effing last). Therefore, we're disabling this entire + // function, and basically checking if anything breaks as HTTPS becomes re-enabled across the board. + return; + + // disable "unreachable code" for the rest of this function, as the disabling is deliberate + + #pragma warning disable 0162 + + // X.509 is SO SO SO broken. The reason we do this, btw, is that mono doesn't come with root certs. At all. // This disables certificate checking completely and accepts ALL certificates. // TODO: Does this install a new handler every time it's been called? How do you verify that this short-circuit is in place? @@ -30,7 +39,8 @@ namespace Swarmops.Logic.Support #pragma warning disable 0219 System.Security.Cryptography.AesCryptoServiceProvider b = new System.Security.Cryptography.AesCryptoServiceProvider(); #pragma warning restore 0219 - + + #pragma warning restore 0162 } public static string GenerateSecureRandomKey(int byteCount)