aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_suites.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/tls_suites.cpp')
-rw-r--r--src/tls/tls_suites.cpp72
1 files changed, 38 insertions, 34 deletions
diff --git a/src/tls/tls_suites.cpp b/src/tls/tls_suites.cpp
index 9a541d124..9c63cd593 100644
--- a/src/tls/tls_suites.cpp
+++ b/src/tls/tls_suites.cpp
@@ -15,27 +15,27 @@ namespace Botan {
*/
TLS_Ciphersuite TLS_Ciphersuite::lookup_ciphersuite(u16bit suite)
{
- // RSA ciphersuites
-
switch(suite)
{
+ // RSA ciphersuites
+
case TLS_RSA_WITH_RC4_128_MD5:
return TLS_Ciphersuite("RSA", "", "MD5", "ARC4", 16);
case TLS_RSA_WITH_RC4_128_SHA:
- return TLS_Ciphersuite("RSA", "", "SHA1", "ARC4", 16);
+ return TLS_Ciphersuite("RSA", "", "SHA-1", "ARC4", 16);
case TLS_RSA_WITH_3DES_EDE_CBC_SHA:
- return TLS_Ciphersuite("RSA", "", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("RSA", "", "SHA-1", "TripleDES", 24);
case TLS_RSA_WITH_AES_128_CBC_SHA:
- return TLS_Ciphersuite("RSA", "", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("RSA", "", "SHA-1", "AES-128", 16);
case TLS_RSA_WITH_AES_256_CBC_SHA:
- return TLS_Ciphersuite("RSA", "", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("RSA", "", "SHA-1", "AES-256", 32);
case TLS_RSA_WITH_SEED_CBC_SHA:
- return TLS_Ciphersuite("RSA", "", "SHA1", "SEED", 16);
+ return TLS_Ciphersuite("RSA", "", "SHA-1", "SEED", 16);
case TLS_RSA_WITH_AES_128_CBC_SHA256:
return TLS_Ciphersuite("RSA", "", "SHA-256", "AES-128", 16);
@@ -43,21 +43,22 @@ TLS_Ciphersuite TLS_Ciphersuite::lookup_ciphersuite(u16bit suite)
case TLS_RSA_WITH_AES_256_CBC_SHA256:
return TLS_Ciphersuite("RSA", "", "SHA-256", "AES-256", 32);
- // DHE/DSS ciphersuites
+ // DHE/DSS ciphersuites
+
case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
- return TLS_Ciphersuite("DSA", "DH", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("DSA", "DH", "SHA-1", "TripleDES", 24);
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
- return TLS_Ciphersuite("DSA", "DH", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("DSA", "DH", "SHA-1", "AES-128", 16);
case TLS_DHE_DSS_WITH_SEED_CBC_SHA:
- return TLS_Ciphersuite("DSA", "DH", "SHA1", "SEED", 16);
+ return TLS_Ciphersuite("DSA", "DH", "SHA-1", "SEED", 16);
case TLS_DHE_DSS_WITH_RC4_128_SHA:
- return TLS_Ciphersuite("DSA", "DH", "SHA1", "ARC4", 16);
+ return TLS_Ciphersuite("DSA", "DH", "SHA-1", "ARC4", 16);
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
- return TLS_Ciphersuite("DSA", "DH", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("DSA", "DH", "SHA-1", "AES-256", 32);
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
return TLS_Ciphersuite("DSA", "DH", "SHA-256", "AES-128", 16);
@@ -65,18 +66,19 @@ TLS_Ciphersuite TLS_Ciphersuite::lookup_ciphersuite(u16bit suite)
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
return TLS_Ciphersuite("DSA", "DH", "SHA-256", "AES-256", 32);
- // DHE/RSA ciphersuites
+ // DHE/RSA ciphersuites
+
case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
- return TLS_Ciphersuite("RSA", "DH", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("RSA", "DH", "SHA-1", "TripleDES", 24);
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
- return TLS_Ciphersuite("RSA", "DH", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("RSA", "DH", "SHA-1", "AES-128", 16);
case TLS_DHE_RSA_WITH_SEED_CBC_SHA:
- return TLS_Ciphersuite("RSA", "DH", "SHA1", "SEED", 16);
+ return TLS_Ciphersuite("RSA", "DH", "SHA-1", "SEED", 16);
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
- return TLS_Ciphersuite("RSA", "DH", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("RSA", "DH", "SHA-1", "AES-256", 32);
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
return TLS_Ciphersuite("RSA", "DH", "SHA-256", "AES-128", 16);
@@ -84,37 +86,39 @@ TLS_Ciphersuite TLS_Ciphersuite::lookup_ciphersuite(u16bit suite)
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
return TLS_Ciphersuite("RSA", "DH", "SHA-256", "AES-256", 32);
- // SRP ciphersuites
+ // SRP ciphersuites
+
case TLS_SRP_SHA_RSA_WITH_3DES_EDE_SHA:
- return TLS_Ciphersuite("RSA", "SRP", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("RSA", "SRP", "SHA-1", "TripleDES", 24);
case TLS_SRP_SHA_DSS_WITH_3DES_EDE_SHA:
- return TLS_Ciphersuite("DSA", "SRP", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("DSA", "SRP", "SHA-1", "TripleDES", 24);
case TLS_SRP_SHA_RSA_WITH_AES_128_SHA:
- return TLS_Ciphersuite("RSA", "SRP", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("RSA", "SRP", "SHA-1", "AES-128", 16);
case TLS_SRP_SHA_DSS_WITH_AES_128_SHA:
- return TLS_Ciphersuite("DSA", "SRP", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("DSA", "SRP", "SHA-1", "AES-128", 16);
case TLS_SRP_SHA_RSA_WITH_AES_256_SHA:
- return TLS_Ciphersuite("RSA", "SRP", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("RSA", "SRP", "SHA-1", "AES-256", 32);
case TLS_SRP_SHA_DSS_WITH_AES_256_SHA:
- return TLS_Ciphersuite("DSA", "SRP", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("DSA", "SRP", "SHA-1", "AES-256", 32);
+
+ // ECC ciphersuites
- // ECC ciphersuites
case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
- return TLS_Ciphersuite("ECDSA", "ECDH", "SHA1", "ARC4", 16);
+ return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-1", "ARC4", 16);
case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
- return TLS_Ciphersuite("ECDSA", "ECDH", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-1", "TripleDES", 24);
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
- return TLS_Ciphersuite("ECDSA", "ECDH", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-1", "AES-128", 16);
case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
- return TLS_Ciphersuite("ECDSA", "ECDH", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-1", "AES-256", 32);
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-256", "AES-128", 16);
@@ -123,16 +127,16 @@ TLS_Ciphersuite TLS_Ciphersuite::lookup_ciphersuite(u16bit suite)
return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-384", "AES-256", 32);
case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
- return TLS_Ciphersuite("RSA", "ECDH", "SHA1", "ARC4", 16);
+ return TLS_Ciphersuite("RSA", "ECDH", "SHA-1", "ARC4", 16);
case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
- return TLS_Ciphersuite("RSA", "ECDH", "SHA1", "TripleDES", 24);
+ return TLS_Ciphersuite("RSA", "ECDH", "SHA-1", "TripleDES", 24);
case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
- return TLS_Ciphersuite("RSA", "ECDH", "SHA1", "AES-128", 16);
+ return TLS_Ciphersuite("RSA", "ECDH", "SHA-1", "AES-128", 16);
case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
- return TLS_Ciphersuite("RSA", "ECDH", "SHA1", "AES-256", 32);
+ return TLS_Ciphersuite("RSA", "ECDH", "SHA-1", "AES-256", 32);
case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
return TLS_Ciphersuite("ECDSA", "ECDH", "SHA-256", "AES-128", 16);