remove references to obsolete CertificatePolicy

This commit is contained in:
UbitUmarov
2019-02-04 21:06:50 +00:00
parent 364b718acf
commit 55f27135dd
2 changed files with 2 additions and 34 deletions

View File

@@ -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
}
}