diff --git a/src/Jackett.Console/ConsoleOptions.cs b/src/Jackett.Console/ConsoleOptions.cs index 42eb80be4..baf800bac 100644 --- a/src/Jackett.Console/ConsoleOptions.cs +++ b/src/Jackett.Console/ConsoleOptions.cs @@ -57,7 +57,7 @@ namespace Jackett.Console [Option('f', "SSLFix", HelpText = "[true/false] Linux Libcurl NSS Missing ECC Ciphers workaround (Use if you can't access some trackers) .")] public bool? SSLFix { get; set; } - [Option('n', "IgnoreSslErrors", HelpText = "[true/false] Linux Libcurl - Ignores invalid SSL certificates")] + [Option('n', "IgnoreSslErrors", HelpText = "[true/false] Ignores invalid SSL certificates")] public bool? IgnoreSslErrors { get; set; } [Option('d', "DataFolder", HelpText = "Specify the location of the data folder (Must be admin on Windows) eg. --DataFolder=\"D:\\Your Data\\Jackett\\\"")] diff --git a/src/Jackett.Console/Program.cs b/src/Jackett.Console/Program.cs index 707057476..edc85b1c0 100644 --- a/src/Jackett.Console/Program.cs +++ b/src/Jackett.Console/Program.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Net; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -96,7 +97,7 @@ namespace JackettConsole Startup.IgnoreSslErrors = options.IgnoreSslErrors; if (options.IgnoreSslErrors == true) { - Engine.Logger.Info("Curl will ignore SSL certificate errors."); + Engine.Logger.Info("Jackett will ignore SSL certificate errors."); } // Choose Data Folder diff --git a/src/Jackett/Utils/Clients/HttpWebClient.cs b/src/Jackett/Utils/Clients/HttpWebClient.cs index 3de1db66b..12afe5e12 100644 --- a/src/Jackett/Utils/Clients/HttpWebClient.cs +++ b/src/Jackett/Utils/Clients/HttpWebClient.cs @@ -27,6 +27,11 @@ namespace Jackett.Utils.Clients public void Init() { + if (Startup.IgnoreSslErrors == true) + { + logger.Info(string.Format("WindowsWebClient: Disabling certificate validation")); + ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; }; + } } public async Task GetBytes(WebRequest request)