aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2011-04-17 18:28:06 +0200
committerMelanie2011-05-13 12:02:49 +0100
commiteceedba23b45e338089070e8b059da63082815a1 (patch)
tree12e78025901873b5166fb8a8088048e0bb908e3b
parentFixes gray tiles on map search for viewers 1. (diff)
downloadopensim-SC-eceedba23b45e338089070e8b059da63082815a1.zip
opensim-SC-eceedba23b45e338089070e8b059da63082815a1.tar.gz
opensim-SC-eceedba23b45e338089070e8b059da63082815a1.tar.bz2
opensim-SC-eceedba23b45e338089070e8b059da63082815a1.tar.xz
Fix the cert validation handler so that it will not block other parts of
the server doing ssl successfully.
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 4c8424d..43672d1 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -118,7 +118,15 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
118 return true; 118 return true;
119 } 119 }
120 120
121 return chain.Build(new X509Certificate2(certificate)); 121 if ((((int)sslPolicyErrors) & ~4) != 0)
122 return false;
123
124 if (ServicePointManager.CertificatePolicy != null)
125 {
126 ServicePoint sp = Request.ServicePoint;
127 return ServicePointManager.CertificatePolicy.CheckValidationResult (sp, certificate, Request, 0);
128 }
129 return true;
122 } 130 }
123 #region IHttpRequestModule Members 131 #region IHttpRequestModule Members
124 132
@@ -464,4 +472,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
464 } 472 }
465 } 473 }
466 } 474 }
467} \ No newline at end of file 475}