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:
authorOliver Neal <oliver.neal@comparethemarket.com>2016-02-09 13:35:18 +0300
committerOliver Neal <oliver.neal@comparethemarket.com>2016-02-19 18:41:52 +0300
commit9dc8e0289d22a79df421bd06849496358c7de92a (patch)
tree2760d455010ae44189eab8f58297146463c40c5b /mcs/class/System.Net.Http.WebRequest
parent1f5f38da2d176b59b9f8a6143f35a0b42d3528fd (diff)
added support for client certificates and the server certificate validation callback
Diffstat (limited to 'mcs/class/System.Net.Http.WebRequest')
-rw-r--r--mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs b/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs
index b19e6b85885..4b6649b430a 100644
--- a/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs
+++ b/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs
@@ -42,6 +42,7 @@ namespace System.Net.Http
int readWriteTimeout;
RemoteCertificateValidationCallback serverCertificateValidationCallback;
bool unsafeAuthenticatedConnectionSharing;
+ X509CertificateCollection clientCertificates;
public WebRequestHandler ()
{
@@ -54,6 +55,7 @@ namespace System.Net.Http
readWriteTimeout = 300000;
serverCertificateValidationCallback = null;
unsafeAuthenticatedConnectionSharing = false;
+ clientCertificates = new X509CertificateCollection();
}
public bool AllowPipelining {
@@ -80,9 +82,8 @@ namespace System.Net.Http
}
}
- [MonoTODO]
public X509CertificateCollection ClientCertificates {
- get { throw new NotImplementedException (); }
+ get { return clientCertificates; }
}
[MonoTODO]
@@ -118,7 +119,6 @@ namespace System.Net.Http
}
}
- [MonoTODO]
public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
get { return serverCertificateValidationCallback; }
set {
@@ -146,6 +146,8 @@ namespace System.Net.Http
wr.MaximumResponseHeadersLength = maxResponseHeadersLength;
wr.ReadWriteTimeout = readWriteTimeout;
wr.UnsafeAuthenticatedConnectionSharing = unsafeAuthenticatedConnectionSharing;
+ wr.ServerCertificateValidationCallback = serverCertificateValidationCallback;
+ wr.ClientCertificates = clientCertificates;
return wr;
}