-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtlsnames.go
124 lines (121 loc) · 5.31 KB
/
tlsnames.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Provide a mapping from uint16 cipher IDs to names.
// The names are chosen to more or less match what Exim logs for no
// particularly strong reason.
//
// Name data is generated from 'openssl ciphers -V' because ha ha who
// wants to do this by hand? We assume that openssl on the author's
// system will cover everything that net/tls supports, which may be
// optimistic someday but is true so far.
// (Generated on Fedora 20 64-bit)
package main
// openssl ciphers -V | sort | field 1 3 4 7 | sed -e 's/,0x//' -e 's/Enc=.*(//' -e 's/)$//' | awk '{printf "%s: %s\n", $1, $3 ":" $2 ":" $4}' | sed -e 's/ / "/' -e 's/$/",/'
var cipherNames = map[uint16]string{
// this will report something for uninitialized cipher values.
0x0000: "NULL-CIPHER-ERROR",
0x0004: "SSLv3:RC4-MD5:128",
0x0005: "SSLv3:RC4-SHA:128",
0x0007: "SSLv3:IDEA-CBC-SHA:128",
0x000A: "SSLv3:DES-CBC3-SHA:168",
0x0013: "SSLv3:EDH-DSS-DES-CBC3-SHA:168",
0x0016: "SSLv3:EDH-RSA-DES-CBC3-SHA:168",
0x001F: "SSLv3:KRB5-DES-CBC3-SHA:168",
0x0020: "SSLv3:KRB5-RC4-SHA:128",
0x0021: "SSLv3:KRB5-IDEA-CBC-SHA:128",
0x0023: "SSLv3:KRB5-DES-CBC3-MD5:168",
0x0024: "SSLv3:KRB5-RC4-MD5:128",
0x0025: "SSLv3:KRB5-IDEA-CBC-MD5:128",
0x002F: "SSLv3:AES128-SHA:128",
0x0032: "SSLv3:DHE-DSS-AES128-SHA:128",
0x0033: "SSLv3:DHE-RSA-AES128-SHA:128",
0x0035: "SSLv3:AES256-SHA:256",
0x0038: "SSLv3:DHE-DSS-AES256-SHA:256",
0x0039: "SSLv3:DHE-RSA-AES256-SHA:256",
0x003C: "TLSv1.2:AES128-SHA256:128",
0x003D: "TLSv1.2:AES256-SHA256:256",
0x0040: "TLSv1.2:DHE-DSS-AES128-SHA256:128",
0x0041: "SSLv3:CAMELLIA128-SHA:128",
0x0044: "SSLv3:DHE-DSS-CAMELLIA128-SHA:128",
0x0045: "SSLv3:DHE-RSA-CAMELLIA128-SHA:128",
0x0067: "TLSv1.2:DHE-RSA-AES128-SHA256:128",
0x006A: "TLSv1.2:DHE-DSS-AES256-SHA256:256",
0x006B: "TLSv1.2:DHE-RSA-AES256-SHA256:256",
0x0084: "SSLv3:CAMELLIA256-SHA:256",
0x0087: "SSLv3:DHE-DSS-CAMELLIA256-SHA:256",
0x0088: "SSLv3:DHE-RSA-CAMELLIA256-SHA:256",
0x008A: "SSLv3:PSK-RC4-SHA:128",
0x008B: "SSLv3:PSK-3DES-EDE-CBC-SHA:168",
0x008C: "SSLv3:PSK-AES128-CBC-SHA:128",
0x008D: "SSLv3:PSK-AES256-CBC-SHA:256",
0x0090: "SSLv3:DHE-PSK-AES128-CBC-SHA:128",
0x0091: "SSLv3:DHE-PSK-AES256-CBC-SHA:256",
0x0096: "SSLv3:SEED-SHA:128",
0x0099: "SSLv3:DHE-DSS-SEED-SHA:128",
0x009A: "SSLv3:DHE-RSA-SEED-SHA:128",
0x009C: "TLSv1.2:AES128-GCM-SHA256:128",
0x009D: "TLSv1.2:AES256-GCM-SHA384:256",
0x009E: "TLSv1.2:DHE-RSA-AES128-GCM-SHA256:128",
0x009F: "TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256",
0x00A2: "TLSv1.2:DHE-DSS-AES128-GCM-SHA256:128",
0x00A3: "TLSv1.2:DHE-DSS-AES256-GCM-SHA384:256",
0x00A8: "TLSv1.2:PSK-AES128-GCM-SHA256:128",
0x00A9: "TLSv1.2:PSK-AES256-GCM-SHA384:256",
0x00AA: "TLSv1.2:DHE-PSK-AES128-GCM-SHA256:128",
0x00AB: "TLSv1.2:DHE-PSK-AES256-GCM-SHA384:256",
0x00AE: "TLSv1:PSK-AES128-CBC-SHA256:128",
0x00B2: "TLSv1:DHE-PSK-AES128-CBC-SHA256:128",
0x1301: "TLSv1.3:TLS_AES_128_GCM_SHA256:128",
0x1302: "TLSv1.3:TLS_AES_256_GCM_SHA384:256",
0x1303: "TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256",
0x1304: "TLSv1.3:TLS_AES_128_CCM_SHA256:128",
0xC002: "SSLv3:ECDH-ECDSA-RC4-SHA:128",
0xC003: "SSLv3:ECDH-ECDSA-DES-CBC3-SHA:168",
0xC004: "SSLv3:ECDH-ECDSA-AES128-SHA:128",
0xC005: "SSLv3:ECDH-ECDSA-AES256-SHA:256",
0xC007: "SSLv3:ECDHE-ECDSA-RC4-SHA:128",
0xC008: "SSLv3:ECDHE-ECDSA-DES-CBC3-SHA:168",
0xC009: "TLSv1:ECDHE-ECDSA-AES128-SHA:128",
0xC00A: "TLSv1:ECDHE-ECDSA-AES256-SHA:256",
0xC00C: "SSLv3:ECDH-RSA-RC4-SHA:128",
0xC00D: "SSLv3:ECDH-RSA-DES-CBC3-SHA:168",
0xC00E: "SSLv3:ECDH-RSA-AES128-SHA:128",
0xC00F: "SSLv3:ECDH-RSA-AES256-SHA:256",
0xC011: "SSLv3:ECDHE-RSA-RC4-SHA:128",
0xC012: "SSLv3:ECDHE-RSA-DES-CBC3-SHA:168",
0xC013: "TLSv1:ECDHE-RSA-AES128-SHA:128",
0xC014: "TLSv1:ECDHE-RSA-AES256-SHA:256",
0xC023: "TLSv1.2:ECDHE-ECDSA-AES128-SHA256:128",
0xC024: "TLSv1.2:ECDHE-ECDSA-AES256-SHA384:256",
0xC025: "TLSv1.2:ECDH-ECDSA-AES128-SHA256:128",
0xC026: "TLSv1.2:ECDH-ECDSA-AES256-SHA384:256",
0xC027: "TLSv1.2:ECDHE-RSA-AES128-SHA256:128",
0xC028: "TLSv1.2:ECDHE-RSA-AES256-SHA384:256",
0xC029: "TLSv1.2:ECDH-RSA-AES128-SHA256:128",
0xC02A: "TLSv1.2:ECDH-RSA-AES256-SHA384:256",
0xC02B: "TLSv1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128",
0xC02C: "TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256",
0xC02D: "TLSv1.2:ECDH-ECDSA-AES128-GCM-SHA256:128",
0xC02E: "TLSv1.2:ECDH-ECDSA-AES256-GCM-SHA384:256",
0xC02F: "TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128",
0xC030: "TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256",
0xC031: "TLSv1.2:ECDH-RSA-AES128-GCM-SHA256:128",
0xC032: "TLSv1.2:ECDH-RSA-AES256-GCM-SHA384:256",
0xC035: "TLSv1:ECDHE-PSK-AES128-CBC-SHA:128",
0xC036: "TLSv1:ECDHE-PSK-AES256-CBC-SHA:256",
0xC037: "TLSv1:ECDHE-PSK-AES128-CBC-SHA256:128",
0xC09C: "TLSv1.2:AES128-CCM:128",
0xC09D: "TLSv1.2:AES256-CCM:256",
0xC09E: "TLSv1.2:DHE-RSA-AES128-CCM:128",
0xC09F: "TLSv1.2:DHE-RSA-AES256-CCM:256",
0xC0A4: "TLSv1.2:PSK-AES128-CCM:128",
0xC0A5: "TLSv1.2:PSK-AES256-CCM:256",
0xC0A6: "TLSv1.2:DHE-PSK-AES128-CCM:128",
0xC0A7: "TLSv1.2:DHE-PSK-AES256-CCM:256",
0xC0AC: "TLSv1.2:ECDHE-ECDSA-AES128-CCM:128",
0xC0AD: "TLSv1.2:ECDHE-ECDSA-AES256-CCM:256",
0xCCA8: "TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256",
0xCCA9: "TLSv1.2:ECDHE-ECDSA-CHACHA20-POLY1305:256",
0xCCAA: "TLSv1.2:DHE-RSA-CHACHA20-POLY1305:256",
0xCCAB: "TLSv1.2:PSK-CHACHA20-POLY1305:256",
0xCCAC: "TLSv1.2:ECDHE-PSK-CHACHA20-POLY1305:256",
0xCCAD: "TLSv1.2:DHE-PSK-CHACHA20-POLY1305:256",
}