Private GIT

Skip to content
Snippets Groups Projects
Commit 1978d35b authored by flightlevel's avatar flightlevel
Browse files

Merge pull request #108 from flightlevel/ignoresslerror

Linux: Ignore SSL certificate errors option added
parents 6262d937 18a2db5a
No related branches found
No related tags found
No related merge requests found
...@@ -83,7 +83,7 @@ You can pass various options when running via the command line, see --help for d ...@@ -83,7 +83,7 @@ You can pass various options when running via the command line, see --help for d
* Unable to connect to certain trackers on Linux * Unable to connect to certain trackers on Linux
Try running with the "--SSLFix true" if you are on Redhat/Fedora/NNS based libcurl. If the tracker is currently configured try removing it and adding it again. Alternatively try running with a different client via --UseClient (Warning: safecurl just executes curl and your details may be seen from the process list). Try running with the "--SSLFix true" if you are on Redhat/Fedora/NNS based libcurl. If the tracker is currently configured try removing it and adding it again. Alternatively try running with a different client via --UseClient (Warning: safecurl just executes curl and your details may be seen from the process list). You can also try running with the "--IgnoreSslErrors true" option which is useful if the site has an invalid SSL certificate.
* Enable logging * Enable logging
......
...@@ -54,6 +54,9 @@ namespace Jackett.Console ...@@ -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) .")] [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; } public bool? SSLFix { get; set; }
[Option('n', "IgnoreSslErrors", HelpText = "[true/false] Linux Libcurl - Ignores invalid SSL certificates")]
public bool? IgnoreSslErrors { get; set; }
[ParserState] [ParserState]
public IParserState LastParserState { get; set; } public IParserState LastParserState { get; set; }
} }
......
...@@ -85,6 +85,14 @@ namespace JackettConsole ...@@ -85,6 +85,14 @@ namespace JackettConsole
Engine.Logger.Info("SSL ECC workaround enabled."); Engine.Logger.Info("SSL ECC workaround enabled.");
else if (options.SSLFix == false) else if (options.SSLFix == false)
Engine.Logger.Info("SSL ECC workaround has been disabled."); 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 ===== */ /* ====== Actions ===== */
// Install service // Install service
......
...@@ -135,6 +135,12 @@ namespace Jackett ...@@ -135,6 +135,12 @@ namespace Jackett
easy.ForbidReuse = true; easy.ForbidReuse = true;
} }
if (Startup.IgnoreSslErrors == true)
{
easy.SetOpt(CurlOption.SslVerifyhost, false);
easy.SetOpt(CurlOption.SslVerifyPeer, false);
}
easy.Perform(); easy.Perform();
if (easy.LastErrorCode != CurlCode.Ok) if (easy.LastErrorCode != CurlCode.Ok)
......
...@@ -46,6 +46,12 @@ namespace Jackett ...@@ -46,6 +46,12 @@ namespace Jackett
set; set;
} }
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder) public void Configuration(IAppBuilder appBuilder)
{ {
// Configure Web API for self-host. // Configure Web API for self-host.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment