public static bool ValidateServerCertificate(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
if (sslPolicyErrors == SslPolicyErrors.None) {
return true;
}
if (sslPolicyErrors == SslPolicyErrors.RemoteCertificateNameMismatch) {
m_log.Error("[OMBASE] WARNING Server provided a certificate that does not match its hostname");
return false;
}
m_log.Error("[OMBASE] Could not validate server certificate.");
m_log.Error("[OMBASE] If you are on Linux, try: mozroots --import --ask-remove");
m_log.Error("[OMBASE] with the user running OpenSim. (Or use --machine).");
return false;
}