Imported Upstream version 4.8.0.344

Former-commit-id: 609085c14e6ad2a66429d180056034e93c0547d2
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-16 13:31:47 +00:00
parent 94b2861243
commit 62edeef69b
89 changed files with 4558 additions and 65 deletions

View File

@ -35,6 +35,7 @@ namespace Mono.Net.Security
MobileAuthenticatedStream parent;
bool serverMode;
string targetHost;
string serverName;
SslProtocols enabledProtocols;
X509Certificate serverCertificate;
X509CertificateCollection clientCertificates;
@ -54,6 +55,13 @@ namespace Mono.Net.Security
this.clientCertificates = clientCertificates;
this.askForClientCert = askForClientCert;
serverName = targetHost;
if (!string.IsNullOrEmpty (serverName)) {
var pos = serverName.IndexOf (':');
if (pos > 0)
serverName = serverName.Substring (0, pos);
}
certificateValidator = CertificateValidationHelper.GetInternalValidator (
parent.Settings, parent.Provider);
}
@ -92,6 +100,10 @@ namespace Mono.Net.Security
get { return targetHost; }
}
protected string ServerName {
get { return serverName; }
}
protected bool AskForClientCertificate {
get { return askForClientCert; }
}