protected override IMonoTlsContext CreateTlsContextImpl(
     string hostname, bool serverMode, TlsProtocols protocolFlags,
     X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
     bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
     MonoTlsSettings settings)
 {
     throw new NotSupportedException();
 }
Example #2
0
		public override IMonoTlsContext CreateTlsContext (
			string hostname, bool serverMode, TlsProtocols protocolFlags,
			X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
			bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
			MonoTlsSettings settings)
		{
			throw new NotSupportedException ();
		}
Example #3
0
        public override IMonoTlsContext CreateTlsContext(
            string hostname, bool serverMode, TlsProtocols protocolFlags,
            SSCX.X509Certificate serverCertificate, PSSCX.X509CertificateCollection clientCertificates,
            bool remoteCertRequired, bool checkCertName, bool checkCertRevocationStatus,
            MonoEncryptionPolicy encryptionPolicy,
            MonoRemoteCertificateValidationCallback userCertificateValidationCallback,
            MonoLocalCertificateSelectionCallback userCertificateSelectionCallback,
            MonoTlsSettings settings)
        {
            TlsConfiguration config;

            if (serverMode)
            {
                var cert     = (PSSCX.X509Certificate2)serverCertificate;
                var monoCert = new MX.X509Certificate(cert.RawData);
                config = new TlsConfiguration((TlsProtocols)protocolFlags, (TlsSettings)settings, monoCert, cert.PrivateKey);
            }
            else
            {
                config = new TlsConfiguration((TlsProtocols)protocolFlags, (TlsSettings)settings, hostname);
                                #if FIXME
                if (certSelectionDelegate != null)
                {
                    config.Client.LocalCertSelectionCallback = (t, l, r, a) => certSelectionDelegate(t, l, r, a);
                }
                                #endif
                if (userCertificateValidationCallback != null)
                {
                    config.RemoteCertValidationCallback = (h, c, ch, p) => {
                        var ssc = new SSCX.X509Certificate(c.RawData);
                        return(userCertificateValidationCallback(h, ssc, null, (MonoSslPolicyErrors)p));
                    };
                }
            }

            return(new TlsContextWrapper(config));
        }
Example #4
0
		public abstract IMonoTlsContext CreateTlsContext (
			string hostname, bool serverMode, TlsProtocols protocolFlags,
			X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
			bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
			MonoTlsSettings settings);
Example #5
0
 public abstract IMonoTlsContext CreateTlsContext(
     string hostname, bool serverMode, TlsProtocols protocolFlags,
     X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
     bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
     MonoTlsSettings settings);