remove references to obsolete CertificatePolicy
parent
364b718acf
commit
55f27135dd
|
@ -504,14 +504,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
if ((((int)sslPolicyErrors) & ~4) != 0)
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -184,26 +184,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
return;
|
||||
}
|
||||
|
||||
// This here is a region module trying to make a global setting.
|
||||
// Not really a good idea but it's Windows only, so I can't test.
|
||||
// THIS IS WRONG need to remove later
|
||||
|
||||
try
|
||||
{
|
||||
ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoCert : ICertificatePolicy
|
||||
{
|
||||
#region ICertificatePolicy Members
|
||||
|
||||
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue