diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2006-12-23 11:25:22 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2006-12-23 11:25:22 +0300 |
commit | 37292a865db9997d876756c7591b75a82ea451a3 (patch) | |
tree | 97b44da592bafbd8315fb9aecfe29041149433a3 /data/net_1_1 | |
parent | 39ce8024a4ca4d54acf57007345c77e91a8c531b (diff) |
2006-12-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* net_1_1/DefaultWsdlHelpGenerator.aspx:
* net_2_0/DefaultWsdlHelpGenerator.aspx: when HTTPS is active, trust
all certificates when querying to our own server. Part 2 of the fix for
bug #80234.
svn path=/trunk/mono/; revision=69987
Diffstat (limited to 'data/net_1_1')
-rw-r--r-- | data/net_1_1/DefaultWsdlHelpGenerator.aspx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/data/net_1_1/DefaultWsdlHelpGenerator.aspx b/data/net_1_1/DefaultWsdlHelpGenerator.aspx index afeeeb40832..c4ceb2d4099 100644 --- a/data/net_1_1/DefaultWsdlHelpGenerator.aspx +++ b/data/net_1_1/DefaultWsdlHelpGenerator.aspx @@ -25,6 +25,7 @@ <%@ Import Namespace="Microsoft.CSharp" %> <%@ Import Namespace="Microsoft.VisualBasic" %> <%@ Import Namespace="System.Text.RegularExpressions" %> +<%@ Import Namespace="System.Security.Cryptography.X509Certificates" %> <%@ Assembly name="System.Web.Services" %> <%@ Page debug="true" %> @@ -306,6 +307,13 @@ bool HasFormResult get { return Request.QueryString ["ext"] == "testform"; } } +class NoCheckCertificatePolicy : ICertificatePolicy { + public bool CheckValidationResult (ServicePoint a, X509Certificate b, WebRequest c, int d) + { + return true; + } +} + string GetTestResult () { if (!HasFormResult) return null; @@ -339,7 +347,9 @@ string GetTestResult () { string url = location + "/" + CurrentOperationName; Uri uri = new Uri (url); - WebRequest req = WebRequest.Create (url + "?" + qs); + HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url + "?" + qs); + if (url.StartsWith ("https:")) + ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy (); HttpCookieCollection cookies = Request.Cookies; int last = cookies.Count; if (last > 0) { |