remove references to obsolete CertificatePolicy

0.9.1.0-post-fixes
UbitUmarov 2019-02-04 21:06:50 +00:00
parent 364b718acf
commit 55f27135dd
2 changed files with 2 additions and 34 deletions

View File

@ -504,14 +504,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
if ((((int)sslPolicyErrors) & ~4) != 0) if ((((int)sslPolicyErrors) & ~4) != 0)
return false; return false;
// Check for policy and execute it if defined
#pragma warning disable 0618
if (ServicePointManager.CertificatePolicy != null)
{
return ServicePointManager.CertificatePolicy.CheckValidationResult (sp, certificate, Request, 0);
}
#pragma warning restore 0618
return true; return true;
} }

View File

@ -184,26 +184,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
return; return;
} }
// This here is a region module trying to make a global setting. // THIS IS WRONG need to remove later
// Not really a good idea but it's Windows only, so I can't test.
try try
{ {
ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation; ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation;
} }
catch (NotImplementedException) catch (NotImplementedException)
{ {
try
{
#pragma warning disable 0612, 0618
// Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this!
ServicePointManager.CertificatePolicy = new MonoCert();
#pragma warning restore 0612, 0618
}
catch (Exception)
{
// COmmented multiline spam log message
//m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions.");
}
} }
} }
@ -884,16 +872,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
return response; return response;
} }
} }
public class MonoCert : ICertificatePolicy
{
#region ICertificatePolicy Members
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
{
return true;
}
#endregion
}
} }