X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain,
ref MonoSslPolicyErrors errors, ref int status11);
#endregion
+
+#region Misc
+
+ internal abstract bool SupportsCleanShutdown {
+ get;
+ }
+
+#endregion
+
}
}
get; set;
}
+ /*
+ * This is only supported if MonoTlsProvider.SupportsCleanShutdown is true.
+ */
+ internal bool SendCloseNotify {
+ get; set;
+ }
+
/*
* If you set this here, then it will override 'ServicePointManager.SecurityProtocol'.
*/
EnabledProtocols = other.EnabledProtocols;
EnabledCiphers = other.EnabledCiphers;
CertificateValidationTime = other.CertificateValidationTime;
+ SendCloseNotify = other.SendCloseNotify;
if (other.TrustAnchors != null)
TrustAnchors = new X509CertificateCollection (other.TrustAnchors);
if (other.CertificateSearchPaths != null) {
public override void Shutdown ()
{
- if (Interlocked.Exchange (ref pendingIO, 1) == 1)
- throw new InvalidOperationException ();
-
- Debug ("Shutdown");
-
- lastException = null;
-
- try {
- if (closed || disposed)
- return;
-
- var status = SSLClose (Handle);
- Debug ("Shutdown done: {0}", status);
- CheckStatusAndThrow (status);
- } finally {
- closed = true;
- pendingIO = 0;
- }
+ closed = true;
}
#endregion
get { return true; }
}
+ internal override bool SupportsCleanShutdown {
+ get { return false; }
+ }
+
public override SslProtocols SupportedProtocols {
get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
}
public override void Shutdown ()
{
Debug ("Shutdown!");
-// ssl.SetQuietShutdown ();
+ if (Settings == null || !Settings.SendCloseNotify)
+ ssl.SetQuietShutdown ();
ssl.Shutdown ();
}
get { return true; }
}
+ internal override bool SupportsCleanShutdown {
+ get { return true; }
+ }
+
public override SslProtocols SupportedProtocols {
get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
}
get { return false; }
}
+ internal override bool SupportsCleanShutdown {
+ get { return false; }
+ }
+
public override SslProtocols SupportedProtocols {
get { return SslProtocols.Tls; }
}