Add Windows support for the IgnoreSslErrors option (#594)

This commit is contained in:
kaso17
2016-11-09 18:26:32 +01:00
committed by GitHub
parent 6b253178b6
commit e7918bddbc
3 changed files with 8 additions and 2 deletions

View File

@@ -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<WebClientByteResult> GetBytes(WebRequest request)