public abstract class MonoTlsProvider
{
+ internal MonoTlsProvider ()
+ {
+ }
+
public abstract Guid ID {
get;
}
get;
}
+ /*
+ * Does this provider support IMonoSslStream.GetConnectionInfo() ?
+ */
+ public abstract bool SupportsConnectionInfo {
+ get;
+ }
+
/*
* Whether or not this TLS Provider supports Mono-specific extensions
* (via @MonoTlsSettings).
#endregion
-#region Certificate Validation
+#region Native Certificate Implementation
- /*
- * Allows a TLS provider to provide a custom system certificiate validator.
- */
- public virtual bool HasCustomSystemCertificateValidator {
+ internal virtual bool HasNativeCertificates {
get { return false; }
}
+ internal virtual X509Certificate2Impl GetNativeCertificate (
+ byte[] data, string password, X509KeyStorageFlags flags)
+ {
+ throw new InvalidOperationException ();
+ }
+
+ internal virtual X509Certificate2Impl GetNativeCertificate (
+ X509Certificate certificate)
+ {
+ throw new InvalidOperationException ();
+ }
+
+#endregion
+
+#region Certificate Validation
/*
* If @serverMode is true, then we're a server and want to validate a certificate
* that we received from a client.
* Returns `true` if certificate validation has been performed and `false` to invoke the
* default system validator.
*/
- public virtual bool InvokeSystemCertificateValidator (
- ICertificateValidator validator, string targetHost, bool serverMode,
- X509CertificateCollection certificates, X509Chain chain, out bool success,
- ref MonoSslPolicyErrors errors, ref int status11)
- {
- success = false;
- return false;
- }
-
-#endregion
-
-#region Manged SSPI
-
- /*
- * The managed SSPI implementation from the new TLS code.
- */
-
- public abstract bool SupportsTlsContext {
- get;
- }
-
- public abstract IMonoTlsContext CreateTlsContext (
- string hostname, bool serverMode, TlsProtocols protocolFlags,
- X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
- bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
- MonoTlsSettings settings);
-
+ internal abstract bool ValidateCertificate (
+ ICertificateValidator2 validator, string targetHost, bool serverMode,
+ X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain,
+ ref MonoSslPolicyErrors errors, ref int status11);
#endregion
}
}