Imported Upstream version 4.6.1.5

Former-commit-id: 2caa1f9d0bda47eb10c52f47196236d819ecb1a3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-10-12 08:30:39 +00:00
parent b7d1d80bf3
commit 36b9cc09f0
17 changed files with 47 additions and 12 deletions

View File

@ -305,6 +305,13 @@ namespace Mono.Net.Security
return new ValidationResult (result, user_denied, 0, (MonoSslPolicyErrors)errors);
}
// Ignore port number when validating certificates.
if (!string.IsNullOrEmpty (host)) {
var pos = host.IndexOf (':');
if (pos > 0)
host = host.Substring (0, pos);
}
ICertificatePolicy policy = ServicePointManager.GetLegacyCertificatePolicy ();
int status11 = 0; // Error code passed to the obsolete ICertificatePolicy callback