mirror of
https://github.com/Jackett/Jackett
synced 2025-02-23 14:51:01 +00:00
HttpWebClient2: implement AddTrustedCertificate()
This commit is contained in:
parent
bed9b9d54b
commit
4d2adf4325
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue