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

the server doing ssl successfully.
avinationmerge
Melanie 2011-04-17 18:28:06 +02:00
parent 5db8dcb563
commit 2761810531
1 changed files with 10 additions and 2 deletions

View File

@ -118,7 +118,15 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
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
@ -478,4 +486,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
}
}
}
}
}