MobileAuthenticatedStream parent;
bool serverMode;
string targetHost;
+ string serverName;
SslProtocols enabledProtocols;
X509Certificate serverCertificate;
X509CertificateCollection clientCertificates;
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);
}
get { return targetHost; }
}
+ protected string ServerName {
+ get { return serverName; }
+ }
+
protected bool AskForClientCertificate {
get { return askForClientCert; }
}
public abstract int Write (byte[] buffer, int offset, int count, out bool wantMore);
- public abstract void Close ();
+ public abstract void Shutdown ();
protected bool ValidateCertificate (X509Certificate leaf, X509Chain chain)
{