Commit 32800806 authored by Alberto Bertogli's avatar Alberto Bertogli

tlsconst: Update TLS cipher suites, and include TLS 1.3

This patch updates the list of known TLS cipher suites, and adds TLS 1.3
to the list of known versions (it will be included in Go 1.12).
parent d0c7c3d4
...@@ -148,6 +148,11 @@ var cipherSuiteName = map[uint16]string{ ...@@ -148,6 +148,11 @@ var cipherSuiteName = map[uint16]string{
0x00c4: "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c4: "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256",
0x00c5: "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256", 0x00c5: "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256",
0x00ff: "TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0x00ff: "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
0x1301: "TLS_AES_128_GCM_SHA256",
0x1302: "TLS_AES_256_GCM_SHA384",
0x1303: "TLS_CHACHA20_POLY1305_SHA256",
0x1304: "TLS_AES_128_CCM_SHA256",
0x1305: "TLS_AES_128_CCM_8_SHA256",
0x5600: "TLS_FALLBACK_SCSV", 0x5600: "TLS_FALLBACK_SCSV",
0xc001: "TLS_ECDH_ECDSA_WITH_NULL_SHA", 0xc001: "TLS_ECDH_ECDSA_WITH_NULL_SHA",
0xc002: "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 0xc002: "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
...@@ -324,6 +329,10 @@ var cipherSuiteName = map[uint16]string{ ...@@ -324,6 +329,10 @@ var cipherSuiteName = map[uint16]string{
0xc0ad: "TLS_ECDHE_ECDSA_WITH_AES_256_CCM", 0xc0ad: "TLS_ECDHE_ECDSA_WITH_AES_256_CCM",
0xc0ae: "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", 0xc0ae: "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8",
0xc0af: "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", 0xc0af: "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8",
0xc0b0: "TLS_ECCPWD_WITH_AES_128_GCM_SHA256",
0xc0b1: "TLS_ECCPWD_WITH_AES_256_GCM_SHA384",
0xc0b2: "TLS_ECCPWD_WITH_AES_128_CCM_SHA256",
0xc0b3: "TLS_ECCPWD_WITH_AES_256_CCM_SHA384",
0xcca8: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 0xcca8: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
0xcca9: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", 0xcca9: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
0xccaa: "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 0xccaa: "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
...@@ -331,4 +340,8 @@ var cipherSuiteName = map[uint16]string{ ...@@ -331,4 +340,8 @@ var cipherSuiteName = map[uint16]string{
0xccac: "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", 0xccac: "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
0xccad: "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256", 0xccad: "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
0xccae: "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256", 0xccae: "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256",
0xd001: "TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256",
0xd002: "TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384",
0xd003: "TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256",
0xd005: "TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256",
} }
...@@ -11,6 +11,7 @@ var versionName = map[uint16]string{ ...@@ -11,6 +11,7 @@ var versionName = map[uint16]string{
0x0301: "TLS-1.0", 0x0301: "TLS-1.0",
0x0302: "TLS-1.1", 0x0302: "TLS-1.1",
0x0303: "TLS-1.2", 0x0303: "TLS-1.2",
0x0304: "TLS-1.3",
} }
// VersionName returns a human-readable TLS version name. // VersionName returns a human-readable TLS version name.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment