aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2019-02-04 21:06:50 +0000
committerUbitUmarov2019-02-04 21:06:50 +0000
commit55f27135dd2212b5d15079384da9ed7c67ea96fc (patch)
treea329f77d494c454fda7691a21f3fabc32c369fc3
parentreduce the odds of MTU violation (diff)
downloadopensim-SC-55f27135dd2212b5d15079384da9ed7c67ea96fc.zip
opensim-SC-55f27135dd2212b5d15079384da9ed7c67ea96fc.tar.gz
opensim-SC-55f27135dd2212b5d15079384da9ed7c67ea96fc.tar.bz2
opensim-SC-55f27135dd2212b5d15079384da9ed7c67ea96fc.tar.xz
remove references to obsolete CertificatePolicy
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs28
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 3d3a768..c3f6d6b 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
504 if ((((int)sslPolicyErrors) & ~4) != 0) 504 if ((((int)sslPolicyErrors) & ~4) != 0)
505 return false; 505 return false;
506 506
507 // Check for policy and execute it if defined
508#pragma warning disable 0618
509 if (ServicePointManager.CertificatePolicy != null)
510 {
511 return ServicePointManager.CertificatePolicy.CheckValidationResult (sp, certificate, Request, 0);
512 }
513#pragma warning restore 0618
514
515 return true; 507 return true;
516 } 508 }
517 509
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index c6d7fe6..533bce2 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
184 return; 184 return;
185 } 185 }
186 186
187 // This here is a region module trying to make a global setting. 187 // THIS IS WRONG need to remove later
188 // Not really a good idea but it's Windows only, so I can't test. 188
189 try 189 try
190 { 190 {
191 ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation; 191 ServicePointManager.ServerCertificateValidationCallback += CustomCertificateValidation;
192 } 192 }
193 catch (NotImplementedException) 193 catch (NotImplementedException)
194 { 194 {
195 try
196 {
197#pragma warning disable 0612, 0618
198 // Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this!
199 ServicePointManager.CertificatePolicy = new MonoCert();
200#pragma warning restore 0612, 0618
201 }
202 catch (Exception)
203 {
204 // COmmented multiline spam log message
205 //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.");
206 }
207 } 195 }
208 } 196 }
209 197
@@ -884,16 +872,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
884 return response; 872 return response;
885 } 873 }
886 } 874 }
887
888 public class MonoCert : ICertificatePolicy
889 {
890 #region ICertificatePolicy Members
891
892 public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
893 {
894 return true;
895 }
896
897 #endregion
898 }
899} 875}