From 55f27135dd2212b5d15079384da9ed7c67ea96fc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 4 Feb 2019 21:06:50 +0000 Subject: [PATCH] remove references to obsolete CertificatePolicy --- .../HttpRequest/ScriptsHttpRequests.cs | 8 ------ .../FreeSwitchVoice/FreeSwitchVoiceModule.cs | 28 ++----------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 3d3a76861b..c3f6d6b2df 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -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; } diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index c6d7fe6138..533bce2244 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -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 - } }