From b8121ad8a2a33a48d7cac0e29f6d9036032c5fc6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 4 Feb 2019 21:44:40 +0000 Subject: [PATCH] prevent freswitch from messing global cert validation, more work is need on rest requests ( also for other things) --- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 533bce2244..be1bd4f8ab 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -183,16 +183,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice m_log.ErrorFormat("[FreeSwitchVoice]: plugin initialization failed: {0} {1}", e.Message, e.StackTrace); return; } - - // THIS IS WRONG need to remove later - - try - { - ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation; - } - catch (NotImplementedException) - { - } } public void PostInitialise() @@ -529,6 +519,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice forwardreq.Method = method; forwardreq.ContentType = contenttype; forwardreq.KeepAlive = false; + forwardreq.ServerCertificateValidationCallback = CustomCertificateValidation; if (method == "POST") {