mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
HttpWebClient2: implement AddTrustedCertificate()
This commit is contained in:
@@ -317,5 +317,18 @@ namespace Jackett.Utils.Clients
|
|||||||
ServerUtil.ResureRedirectIsFullyQualified(webRequest, result);
|
ServerUtil.ResureRedirectIsFullyQualified(webRequest, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override public void AddTrustedCertificate(string host, string hash)
|
||||||
|
{
|
||||||
|
hash = hash.ToUpper();
|
||||||
|
ICollection<string> hosts;
|
||||||
|
trustedCertificates.TryGetValue(hash.ToUpper(), out hosts);
|
||||||
|
if (hosts == null)
|
||||||
|
{
|
||||||
|
hosts = new HashSet<string>();
|
||||||
|
trustedCertificates[hash] = hosts;
|
||||||
|
}
|
||||||
|
hosts.Add(host);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user