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:
-rw-r--r--mcs/class/System/Mono.Net.Security/MonoTlsStream.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
index 79e4fbf6845..2a412482527 100644
--- a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
+++ b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
@@ -96,8 +96,15 @@ namespace Mono.Net.Security
sslStream = provider.CreateSslStream (networkStream, false, settings);
try {
+ var host = request.Host;
+ if (!string.IsNullOrEmpty (host)) {
+ var pos = host.IndexOf (':');
+ if (pos > 0)
+ host = host.Substring (0, pos);
+ }
+
sslStream.AuthenticateAsClient (
- request.Host, request.ClientCertificates,
+ host, request.ClientCertificates,
(SslProtocols)ServicePointManager.SecurityProtocol,
ServicePointManager.CheckCertificateRevocationList);