Disabled cert checks on install because Mono's broken cert store

This commit is contained in:
Rick Falkvinge
2016-09-14 12:20:27 +02:00
parent cfbbf0325d
commit c9cb85fb4c
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -89,6 +89,10 @@ namespace Swarmops.Logic.Support
{
Console.WriteLine(" trying fallback...");
// Because Mono installs with an insufficient certificate store, we must disable certificate checking before accessing github
SupportFunctions.DisableSslCertificateChecks();
fileName = String.Format("https://raw.githubusercontent.com/Swarmops/Swarmops/master/Database/Schemata/upgrade-{0:D4}.sql",
currentDbVersion);
+2
View File
@@ -18,6 +18,8 @@ namespace Swarmops.Logic.Support
// 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?
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => true;
}