Exemplo n.º 1
0
        private TlsConnectionResult ProcessKeyExchange(TlsRsaKeyExchange keyExchange)
        {
            TlsVersion              version      = Context.ServerVersion.ToTlsVersion();
            CipherSuite             cipherSuite  = mSecurityParameters.CipherSuite.ToCipherSuite();
            List <X509Certificate2> certificates = mPeerCertificate.ToCertificateList();

            base.CleanupHandshake();
            return(new TlsConnectionResult(version, cipherSuite, null, null, _error, _errorMessage, null, certificates));
        }
Exemplo n.º 2
0
        private TlsConnectionResult ProcessKeyExchange(TestTlsDheKeyExchange keyExchange)
        {
            CurveGroup group = keyExchange.DhParameters.ToGroup();

            TlsVersion              version                = Context.ServerVersion.ToTlsVersion();
            CipherSuite             cipherSuite            = mSecurityParameters.CipherSuite.ToCipherSuite();
            SignatureHashAlgorithm  signatureHashAlgorithm = keyExchange.EcSignatureAndHashAlgorithm.ToSignatureAlgorithm();
            List <X509Certificate2> certificates           = mPeerCertificate.ToCertificateList();

            base.CleanupHandshake();
            return(new TlsConnectionResult(version, cipherSuite, group, signatureHashAlgorithm, _error, _errorMessage, null, certificates));
        }
Exemplo n.º 3
0
        private TlsConnectionResult ProcessKeyExchange(TestTlsEcDhKeyExchange keyExchange)
        {
            string curveName = keyExchange.EcPublicKeyParameters.Parameters.Curve.GetType().Name.ToLower();

            CurveGroup              curve        = curveName.ToCurve();
            TlsVersion              version      = Context.ServerVersion.ToTlsVersion();
            CipherSuite             cipherSuite  = mSecurityParameters.CipherSuite.ToCipherSuite();
            List <X509Certificate2> certificates = mPeerCertificate.ToCertificateList();

            base.CleanupHandshake();
            return(new TlsConnectionResult(version, cipherSuite, curve, null, _error, _errorMessage, null, certificates));
        }