Skip to content
Snippets Groups Projects
Commit ef64c171 authored by Andreia Gaita's avatar Andreia Gaita
Browse files

Disable ssl validation, for now

parent 4ea3ce15
No related branches found
No related tags found
No related merge requests found
......@@ -140,18 +140,19 @@ namespace GitHub.Unity
X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
var success = true;
// TODO: Invoke MozRoots.Process() to populate the certificate store and make this code work properly.
// If there are errors in the certificate chain, look at each error to determine the cause.
if (sslPolicyErrors != SslPolicyErrors.None)
{
foreach (var status in chain.ChainStatus.Where(st => st.Status != X509ChainStatusFlags.RevocationStatusUnknown))
{
chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain;
chain.ChainPolicy.RevocationMode = X509RevocationMode.Online;
chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 1, 0);
chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags;
success &= chain.Build((X509Certificate2)certificate);
}
}
//if (sslPolicyErrors != SslPolicyErrors.None)
//{
// foreach (var status in chain.ChainStatus.Where(st => st.Status != X509ChainStatusFlags.RevocationStatusUnknown))
// {
// chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain;
// chain.ChainPolicy.RevocationMode = X509RevocationMode.Online;
// chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 1, 0);
// chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags;
// success &= chain.Build((X509Certificate2)certificate);
// }
//}
return success;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment