Fix the cert validation handler so that it will not block other parts of

the server doing ssl successfully.
bulletsim
Melanie 2011-04-17 18:28:06 +02:00
parent 8a5f6dc7a5
commit eceedba23b
1 changed files with 10 additions and 2 deletions

View File

@ -118,7 +118,15 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
return true; return true;
} }
return chain.Build(new X509Certificate2(certificate)); if ((((int)sslPolicyErrors) & ~4) != 0)
return false;
if (ServicePointManager.CertificatePolicy != null)
{
ServicePoint sp = Request.ServicePoint;
return ServicePointManager.CertificatePolicy.CheckValidationResult (sp, certificate, Request, 0);
}
return true;
} }
#region IHttpRequestModule Members #region IHttpRequestModule Members
@ -464,4 +472,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
} }
} }
} }
} }