Imported Upstream version 4.8.0.395

Former-commit-id: bc4eb15577ba347ac08038f1ebaa41e253f5b948
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-01-03 15:17:25 +00:00
parent 006de68e1e
commit 693afccc61
28 changed files with 123 additions and 60 deletions

View File

@@ -95,8 +95,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);