Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-07-14 18:02:20 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-07-14 18:02:20 +0400
commit328030e54e6dc29a8cf0b7d49ceaed68a0544dcb (patch)
tree7d84cd449b86feaf7b39928f7418f8e7b421bac8 /mcs/class/Mono.Security
parent005ce783056fffee4701d0940c5341281b4a4680 (diff)
2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs: get an HttpWebRequest so that we can use the ServicePoint it has. No need to get the host now. * System/System.Net/WebConnection.cs: moved loading of the ssl stream Type to its own method. Don't create a new ssl stream if we're reusing the connection. * System/System.Net/WebConnectionStream.cs: ensure the number of bytes copied in ReadAll is the expected even if the dta from the server has extra bytes. Partial fix for bug #61218. Still problems with POST. svn path=/branches/mono-1-0/mcs/; revision=31135
Diffstat (limited to 'mcs/class/Mono.Security')
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog5
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs12
2 files changed, 10 insertions, 7 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
index e55f1f5ecd8..465b03715b7 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpsClientStream.cs: get an HttpWebRequest so that we can use the
+ ServicePoint it has. No need to get the host now.
+
2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls/Alert.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
index 1da66f06849..678cf83163c 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
@@ -40,14 +40,13 @@ namespace Mono.Security.Protocol.Tls {
internal class HttpsClientStream : SslClientStream {
- private string _host;
- private WebRequest _request;
+ private HttpWebRequest _request;
- public HttpsClientStream (Stream stream, string targetHost, X509CertificateCollection clientCertificates, WebRequest request)
- : base (stream, targetHost, false, SecurityProtocolType.Default, clientCertificates)
+ public HttpsClientStream (Stream stream, X509CertificateCollection clientCertificates,
+ HttpWebRequest request)
+ : base (stream, request.RequestUri.Host, false, SecurityProtocolType.Default, clientCertificates)
{
- _host = targetHost;
// this constructor permit access to the WebRequest to call
// ICertificatePolicy.CheckValidationResult
_request = request;
@@ -61,8 +60,7 @@ namespace Mono.Security.Protocol.Tls {
{
bool failed = (certificateErrors.Length > 0);
if (ServicePointManager.CertificatePolicy != null) {
- Uri target = new Uri ("https://" + _host);
- ServicePoint sp = ServicePointManager.FindServicePoint (target);
+ ServicePoint sp = _request.ServicePoint;
// only one problem can be reported by this interface
int problem = ((failed) ? certificateErrors [0] : 0);