private void RegisterSuites(TlsExtensionManager manager)
        {
            manager.RegisterCipher(GCMCipherAlgorithms.AES_128_GCM, () => new AEADCipherAdapter(new GCMCipher(new AESCipher(128))));
            manager.RegisterCipher(GCMCipherAlgorithms.AES_256_GCM, () => new AEADCipherAdapter(new GCMCipher(new AESCipher(256))));

            manager.RegisterSuite(GCMCipherSuites.TLS_RSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, TlsKeyExchange.RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_RSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, TlsKeyExchange.RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, TlsKeyExchange.DHE_RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, TlsKeyExchange.DHE_RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_RSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, TlsKeyExchange.DH_RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_RSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, TlsKeyExchange.DH_RSA);
            manager.RegisterSuite(GCMCipherSuites.TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.DSA, TlsKeyExchange.DHE_DSS);
            manager.RegisterSuite(GCMCipherSuites.TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.DSA, TlsKeyExchange.DHE_DSS);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_DSS_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.DSA, TlsKeyExchange.DH_DSS);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_DSS_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.DSA, TlsKeyExchange.DH_DSS);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_anon_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.Anonymous, TlsKeyExchange.DH_anon);
            manager.RegisterSuite(GCMCipherSuites.TLS_DH_anon_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.Anonymous, TlsKeyExchange.DH_anon);
        }
 public override void Configure(TlsExtensionManager manager)
 {
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA256, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA384, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA256, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA384, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, GCMCipherAlgorithms.AES_128_GCM, TlsHashAlgorithm.SHA256, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
     manager.RegisterSuite(ECGCMCipherSuites.TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, GCMCipherAlgorithms.AES_256_GCM, TlsHashAlgorithm.SHA384, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
 }
        public override void Configure(TlsExtensionManager manager)
        {
            manager.RegisterHelloExtension(SupportedGroupsExtension.HelloType, (state, data) => new SupportedGroupsExtension(state, data));
            manager.RegisterHelloExtension(SupportedPointFormatsExtension.HelloType, (state, data) => new SupportedPointFormatsExtension(state, data));

            manager.RegisterKeyExchange(ECKeyExchange.ECDH_RSA, () => new ECDHKeyExchange());
            manager.RegisterKeyExchange(ECKeyExchange.ECDHE_RSA, () => new ECDHEKeyExchange());

            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_ECDSA_WITH_NULL_SHA, TlsCipherAlgorithm.Null, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TlsCipherAlgorithm.RC4_128, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TlsCipherAlgorithm.THREEDES_EDE_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDH_ECDSA);

            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_ECDSA_WITH_NULL_SHA, TlsCipherAlgorithm.Null, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TlsCipherAlgorithm.RC4_128, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TlsCipherAlgorithm.THREEDES_EDE_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA1, ECSignatureAlgorithm.ECDSA, ECKeyExchange.ECDHE_ECDSA);

            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_RSA_WITH_NULL_SHA, TlsCipherAlgorithm.Null, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_RSA_WITH_RC4_128_SHA, TlsCipherAlgorithm.RC4_128, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TlsCipherAlgorithm.THREEDES_EDE_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDH_RSA);

            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_RSA_WITH_NULL_SHA, TlsCipherAlgorithm.Null, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_RSA_WITH_RC4_128_SHA, TlsCipherAlgorithm.RC4_128, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TlsCipherAlgorithm.THREEDES_EDE_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.RSA, ECKeyExchange.ECDHE_RSA);

            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_anon_WITH_NULL_SHA, TlsCipherAlgorithm.Null, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.Anonymous, ECKeyExchange.ECDH_anon);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_anon_WITH_RC4_128_SHA, TlsCipherAlgorithm.RC4_128, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.Anonymous, ECKeyExchange.ECDH_anon);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, TlsCipherAlgorithm.THREEDES_EDE_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.Anonymous, ECKeyExchange.ECDH_anon);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_anon_WITH_AES_128_CBC_SHA, TlsCipherAlgorithm.AES_128_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.Anonymous, ECKeyExchange.ECDH_anon);
            manager.RegisterSuite(ECCipherSuites.TLS_ECDH_anon_WITH_AES_256_CBC_SHA, TlsCipherAlgorithm.AES_256_CBC, TlsHashAlgorithm.SHA1, TlsSignatureAlgorithm.Anonymous, ECKeyExchange.ECDH_anon);
        }
 public override void Configure(TlsExtensionManager manager)
 {
     manager.RegisterHelloExtension(SignatureAlgorithmExtension.Type, Factory);
 }
 /// <summary>
 /// Called when the extension is registered
 /// </summary>
 public abstract void Configure(TlsExtensionManager manager);
 public override void Configure(TlsExtensionManager manager)
 {
     RegisterSuites(manager);
 }