From ce224ddd40a11aa7f5b394b17ceb961b88709b01 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 7 Jan 2016 22:38:51 +0100 Subject: [PATCH] Disabled SSL cert checking on backend, for Mono installs no root certs so everythign fails. This is so B0RKEN --- Backend/Program.cs | 6 ++++++ Logic/Financial/ExchangeRateSnapshot.cs | 2 -- Site5/Master-v5.master.cs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Backend/Program.cs b/Backend/Program.cs index 278114d0..cb0784a0 100644 --- a/Backend/Program.cs +++ b/Backend/Program.cs @@ -160,6 +160,12 @@ namespace Swarmops.Backend BotLog.Write(0, "MainCycle", "Backend STARTING"); + // Disable certificate checking due to Mono not installing with a certificate repository - this is UTTERLY broken + + SupportFunctions.DisableSslCertificateChecks(); // MONO BUG/MISFEATURE: Mono has no root certificates, so can't verify cert + + // Tell sysop we're starting + OutboundComm.CreateNotification (null, NotificationResource.System_Startup); // Check for existence of installation ID. If not, create one. Warning: has privacy implications when communicated. diff --git a/Logic/Financial/ExchangeRateSnapshot.cs b/Logic/Financial/ExchangeRateSnapshot.cs index 36c48ba3..81b14287 100644 --- a/Logic/Financial/ExchangeRateSnapshot.cs +++ b/Logic/Financial/ExchangeRateSnapshot.cs @@ -41,8 +41,6 @@ namespace Swarmops.Logic.Financial { using(WebClient client = new WebClient()) { - SupportFunctions.DisableSslCertificateChecks(); // MONO BUG/MISFEATURE: Mono has no root certificates, so can't verify cert - client.Encoding = Encoding.UTF8; string rateDataRaw = client.DownloadString("https://bitpay.com/api/rates"); diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index 0e5fac7e..38076f35 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -41,7 +41,7 @@ namespace Swarmops // HotBitcoinAddresses testAddresses = HotBitcoinAddresses.ForOrganization (Organization.FromIdentity (2)); // testAddresses.UpdateBalances(); - // BitcoinUtility.TestUnspents ("19WEHvYWG5gvPf7X3USXwS7QdFfE1dGSQF"); + // BitcoinUtility.TestUnspents("1GDV1QHQAdxxawqnvXiKhzypCSgwA4Xqts"); // Payouts.PerformAutomated();