From 3ce65eec08554437c61dbf67288072e4fd99eb95 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 5 Dec 2014 14:05:30 -0800 Subject: [PATCH] Log HTTPS cert errors --- .../Security/IgnoreCertErrorPolicy.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/NzbDrone.Common/Security/IgnoreCertErrorPolicy.cs b/src/NzbDrone.Common/Security/IgnoreCertErrorPolicy.cs index e46221e24..537cf430b 100644 --- a/src/NzbDrone.Common/Security/IgnoreCertErrorPolicy.cs +++ b/src/NzbDrone.Common/Security/IgnoreCertErrorPolicy.cs @@ -2,14 +2,13 @@ using System.Net.Security; using System.Security.Cryptography.X509Certificates; using NLog; -using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Instrumentation; namespace NzbDrone.Common.Security { public static class IgnoreCertErrorPolicy { - private static Logger _logger = NzbDroneLogger.GetLogger("IgnoreCertErrorPolicy"); + private static readonly Logger Logger = NzbDroneLogger.GetLogger("IgnoreCertErrorPolicy"); public static void Register() { @@ -30,19 +29,7 @@ namespace NzbDrone.Common.Security return true; } - _logger.Warn("Request for {0} failed certificated validation. {1}", request.Address, sslpolicyerrors); - - if (OsInfo.IsMono) - { - return true; - } - - var host = request.Address.Host.ToLower(); - - if (host.EndsWith("nzbdrone.com") || host.EndsWith("sonarr.tv")) - { - return false; - } + Logger.Error("Request for {0} failed certificated validation. {1}", request.Address, sslpolicyerrors); return true; }