Linux: Ignore SSL certificate errors option added

Linux: Ignore SSL certificate errors option added
This commit is contained in:
flightlevel
2015-12-02 21:19:51 +11:00
parent 6262d937d4
commit 18a2db5af2
5 changed files with 24 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ 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")]
public bool? IgnoreSslErrors { get; set; }
[ParserState]
public IParserState LastParserState { get; set; }
}

View File

@@ -85,6 +85,14 @@ namespace JackettConsole
Engine.Logger.Info("SSL ECC workaround enabled.");
else if (options.SSLFix == false)
Engine.Logger.Info("SSL ECC workaround has been disabled.");
// Ignore SSL errors on Curl
Startup.IgnoreSslErrors = options.IgnoreSslErrors;
if (options.IgnoreSslErrors == true)
{
Engine.Logger.Info("Curl will ignore SSL certificate errors.");
}
/* ====== Actions ===== */
// Install service

View File

@@ -135,6 +135,12 @@ namespace Jackett
easy.ForbidReuse = true;
}
if (Startup.IgnoreSslErrors == true)
{
easy.SetOpt(CurlOption.SslVerifyhost, false);
easy.SetOpt(CurlOption.SslVerifyPeer, false);
}
easy.Perform();
if (easy.LastErrorCode != CurlCode.Ok)

View File

@@ -46,6 +46,12 @@ namespace Jackett
set;
}
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder)
{
// Configure Web API for self-host.