21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 |
|
27 package sun.security.ssl; |
26 package sun.security.ssl; |
28 |
27 |
29 import java.util.*; |
28 import java.util.ArrayList; |
30 |
29 import java.util.Arrays; |
31 import java.security.NoSuchAlgorithmException; |
30 import java.util.Collection; |
32 import java.security.InvalidKeyException; |
31 import java.util.Collections; |
33 import java.security.SecureRandom; |
32 import java.util.LinkedList; |
34 import java.security.KeyManagementException; |
33 import java.util.List; |
35 |
34 import static sun.security.ssl.CipherSuite.HashAlg.*; |
36 import javax.crypto.Cipher; |
|
37 import javax.crypto.SecretKey; |
|
38 import javax.crypto.spec.IvParameterSpec; |
|
39 import javax.crypto.spec.SecretKeySpec; |
|
40 |
|
41 import static sun.security.ssl.CipherSuite.KeyExchange.*; |
35 import static sun.security.ssl.CipherSuite.KeyExchange.*; |
42 import static sun.security.ssl.CipherSuite.PRF.*; |
|
43 import static sun.security.ssl.CipherSuite.CipherType.*; |
|
44 import static sun.security.ssl.CipherSuite.MacAlg.*; |
36 import static sun.security.ssl.CipherSuite.MacAlg.*; |
45 import static sun.security.ssl.CipherSuite.BulkCipher.*; |
37 import static sun.security.ssl.SSLCipher.*; |
46 import static sun.security.ssl.JsseJce.*; |
38 import sun.security.ssl.SupportedGroupsExtension.NamedGroupType; |
47 import static sun.security.ssl.NamedGroupType.*; |
39 import static sun.security.ssl.SupportedGroupsExtension.NamedGroupType.*; |
48 |
40 |
49 /** |
41 enum CipherSuite { |
50 * An SSL/TLS CipherSuite. Constants for the standard key exchange, cipher, |
42 // |
51 * and mac algorithms are also defined in this class. |
43 // in preference order |
52 * |
44 // |
53 * The CipherSuite class and the inner classes defined in this file roughly |
45 |
54 * follow the type safe enum pattern described in Effective Java. This means: |
46 // Definition of the CipherSuites that are enabled by default. |
55 * |
47 // |
56 * . instances are immutable, classes are final |
48 // They are listed in preference order, most preferred first, using |
57 * |
49 // the following criteria: |
58 * . there is a unique instance of every value, i.e. there are never two |
50 // 1. Prefer Suite B compliant cipher suites, see RFC6460 (To be |
59 * instances representing the same CipherSuite, etc. This means equality |
51 // changed later, see below). |
60 * tests can be performed using == instead of equals() (although that works |
52 // 2. Prefer the stronger bulk cipher, in the order of AES_256(GCM), |
61 * as well). [A minor exception are *unsupported* CipherSuites read from a |
53 // AES_128(GCM), AES_256, AES_128, 3DES-EDE. |
62 * handshake message, but this is usually irrelevant] |
54 // 3. Prefer the stronger MAC algorithm, in the order of SHA384, |
63 * |
55 // SHA256, SHA, MD5. |
64 * . instances are obtained using the static valueOf() factory methods. |
56 // 4. Prefer the better performance of key exchange and digital |
65 * |
57 // signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA, |
66 * . properties are defined as final variables and made available as |
58 // RSA, ECDH-ECDSA, ECDH-RSA, DHE-RSA, DHE-DSS. |
67 * package private variables without method accessors |
59 |
68 * |
60 TLS_AES_128_GCM_SHA256( |
69 * . if the member variable allowed is false, the given algorithm is either |
61 0x1301, true, "TLS_AES_128_GCM_SHA256", |
70 * unavailable or disabled at compile time |
62 ProtocolVersion.PROTOCOLS_OF_13, B_AES_128_GCM_IV, H_SHA256), |
71 * |
63 TLS_AES_256_GCM_SHA384( |
72 */ |
64 0x1302, true, "TLS_AES_256_GCM_SHA384", |
73 final class CipherSuite implements Comparable<CipherSuite> { |
65 ProtocolVersion.PROTOCOLS_OF_13, B_AES_256_GCM_IV, H_SHA384), |
74 |
66 |
75 // minimum priority for supported CipherSuites |
67 // Suite B compliant cipher suites, see RFC 6460. |
76 static final int SUPPORTED_SUITES_PRIORITY = 1; |
68 // |
77 |
69 // Note that, at present this provider is not Suite B compliant. The |
78 // minimum priority for default enabled CipherSuites |
70 // preference order of the GCM cipher suites does not follow the spec |
79 static final int DEFAULT_SUITES_PRIORITY = 300; |
71 // of RFC 6460. In this section, only two cipher suites are listed |
80 |
72 // so that applications can make use of Suite-B compliant cipher |
81 private static final boolean ALLOW_ECC = Debug.getBooleanProperty |
73 // suite firstly. |
82 ("com.sun.net.ssl.enableECC", true); |
74 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384( |
83 |
75 0xC02C, true, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "", |
84 // Map Integer(id) -> CipherSuite |
76 ProtocolVersion.PROTOCOLS_OF_12, |
85 // contains all known CipherSuites |
77 K_ECDHE_ECDSA, B_AES_256_GCM, M_NULL, H_SHA384), |
86 private static final Map<Integer,CipherSuite> idMap; |
78 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256( |
87 |
79 0xC02B, true, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "", |
88 // Map String(name) -> CipherSuite |
80 ProtocolVersion.PROTOCOLS_OF_12, |
89 // contains only supported CipherSuites (i.e. allowed == true) |
81 K_ECDHE_ECDSA, B_AES_128_GCM, M_NULL, H_SHA256), |
90 private static final Map<String,CipherSuite> nameMap; |
82 |
91 |
83 // AES_256(GCM) |
92 // Protocol defined CipherSuite name, e.g. SSL_RSA_WITH_RC4_128_MD5 |
84 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384( |
93 // we use TLS_* only for new CipherSuites, still SSL_* for old ones |
85 0xC030, true, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "", |
|
86 ProtocolVersion.PROTOCOLS_OF_12, |
|
87 K_ECDHE_RSA, B_AES_256_GCM, M_NULL, H_SHA384), |
|
88 TLS_RSA_WITH_AES_256_GCM_SHA384( |
|
89 0x009D, true, "TLS_RSA_WITH_AES_256_GCM_SHA384", "", |
|
90 ProtocolVersion.PROTOCOLS_OF_12, |
|
91 K_RSA, B_AES_256_GCM, M_NULL, H_SHA384), |
|
92 TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384( |
|
93 0xC02E, true, "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", "", |
|
94 ProtocolVersion.PROTOCOLS_OF_12, |
|
95 K_ECDH_ECDSA, B_AES_256_GCM, M_NULL, H_SHA384), |
|
96 TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384( |
|
97 0xC032, true, "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", "", |
|
98 ProtocolVersion.PROTOCOLS_OF_12, |
|
99 K_ECDH_RSA, B_AES_256_GCM, M_NULL, H_SHA384), |
|
100 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384( |
|
101 0x009F, true, "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", "", |
|
102 ProtocolVersion.PROTOCOLS_OF_12, |
|
103 K_DHE_RSA, B_AES_256_GCM, M_NULL, H_SHA384), |
|
104 TLS_DHE_DSS_WITH_AES_256_GCM_SHA384( |
|
105 0x00A3, true, "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", "", |
|
106 ProtocolVersion.PROTOCOLS_OF_12, |
|
107 K_DHE_DSS, B_AES_256_GCM, M_NULL, H_SHA384), |
|
108 |
|
109 // AES_128(GCM) |
|
110 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256( |
|
111 0xC02F, true, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "", |
|
112 ProtocolVersion.PROTOCOLS_OF_12, |
|
113 K_ECDHE_RSA, B_AES_128_GCM, M_NULL, H_SHA256), |
|
114 TLS_RSA_WITH_AES_128_GCM_SHA256( |
|
115 0x009C, true, "TLS_RSA_WITH_AES_128_GCM_SHA256", "", |
|
116 ProtocolVersion.PROTOCOLS_OF_12, |
|
117 K_RSA, B_AES_128_GCM, M_NULL, H_SHA256), |
|
118 TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256( |
|
119 0xC02D, true, "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", "", |
|
120 ProtocolVersion.PROTOCOLS_OF_12, |
|
121 K_ECDH_ECDSA, B_AES_128_GCM, M_NULL, H_SHA256), |
|
122 TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256( |
|
123 0xC031, true, "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", "", |
|
124 ProtocolVersion.PROTOCOLS_OF_12, |
|
125 K_ECDH_RSA, B_AES_128_GCM, M_NULL, H_SHA256), |
|
126 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256( |
|
127 0x009E, true, "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", "", |
|
128 ProtocolVersion.PROTOCOLS_OF_12, |
|
129 K_DHE_RSA, B_AES_128_GCM, M_NULL, H_SHA256), |
|
130 TLS_DHE_DSS_WITH_AES_128_GCM_SHA256( |
|
131 0x00A2, true, "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", "", |
|
132 ProtocolVersion.PROTOCOLS_OF_12, |
|
133 K_DHE_DSS, B_AES_128_GCM, M_NULL, H_SHA256), |
|
134 |
|
135 // AES_256(CBC) |
|
136 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384( |
|
137 0xC024, true, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "", |
|
138 ProtocolVersion.PROTOCOLS_OF_12, |
|
139 K_ECDHE_ECDSA, B_AES_256, M_SHA384, H_SHA384), |
|
140 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384( |
|
141 0xC028, true, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "", |
|
142 ProtocolVersion.PROTOCOLS_OF_12, |
|
143 K_ECDHE_RSA, B_AES_256, M_SHA384, H_SHA384), |
|
144 TLS_RSA_WITH_AES_256_CBC_SHA256( |
|
145 0x003D, true, "TLS_RSA_WITH_AES_256_CBC_SHA256", "", |
|
146 ProtocolVersion.PROTOCOLS_OF_12, |
|
147 K_RSA, B_AES_256, M_SHA384, H_SHA384), |
|
148 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384( |
|
149 0xC026, true, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", "", |
|
150 ProtocolVersion.PROTOCOLS_OF_12, |
|
151 K_ECDH_ECDSA, B_AES_256, M_SHA384, H_SHA384), |
|
152 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384( |
|
153 0xC02A, true, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", "", |
|
154 ProtocolVersion.PROTOCOLS_OF_12, |
|
155 K_ECDH_RSA, B_AES_256, M_SHA384, H_SHA384), |
|
156 TLS_DHE_RSA_WITH_AES_256_CBC_SHA256( |
|
157 0x006B, true, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", "", |
|
158 ProtocolVersion.PROTOCOLS_OF_12, |
|
159 K_DHE_RSA, B_AES_256, M_SHA384, H_SHA256), |
|
160 TLS_DHE_DSS_WITH_AES_256_CBC_SHA256( |
|
161 0x006A, true, "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", "", |
|
162 ProtocolVersion.PROTOCOLS_OF_12, |
|
163 K_DHE_DSS, B_AES_256, M_SHA384, H_SHA256), |
|
164 |
|
165 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA( |
|
166 0xC00A, true, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "", |
|
167 ProtocolVersion.PROTOCOLS_TO_12, |
|
168 K_ECDHE_ECDSA, B_AES_256, M_SHA, H_SHA256), |
|
169 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA( |
|
170 0xC014, true, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "", |
|
171 ProtocolVersion.PROTOCOLS_TO_12, |
|
172 K_ECDHE_RSA, B_AES_256, M_SHA, H_SHA256), |
|
173 TLS_RSA_WITH_AES_256_CBC_SHA( |
|
174 0x0035, true, "TLS_RSA_WITH_AES_256_CBC_SHA", "", |
|
175 ProtocolVersion.PROTOCOLS_TO_12, |
|
176 K_RSA, B_AES_256, M_SHA, H_SHA256), |
|
177 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA( |
|
178 0xC005, true, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", "", |
|
179 ProtocolVersion.PROTOCOLS_TO_12, |
|
180 K_ECDH_ECDSA, B_AES_256, M_SHA, H_SHA256), |
|
181 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA( |
|
182 0xC00F, true, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", "", |
|
183 ProtocolVersion.PROTOCOLS_TO_12, |
|
184 K_ECDH_RSA, B_AES_256, M_SHA, H_SHA256), |
|
185 TLS_DHE_RSA_WITH_AES_256_CBC_SHA( |
|
186 0x0039, true, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", "", |
|
187 ProtocolVersion.PROTOCOLS_TO_12, |
|
188 K_DHE_RSA, B_AES_256, M_SHA, H_SHA256), |
|
189 TLS_DHE_DSS_WITH_AES_256_CBC_SHA( |
|
190 0x0038, true, "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", "", |
|
191 ProtocolVersion.PROTOCOLS_TO_12, |
|
192 K_DHE_DSS, B_AES_256, M_SHA, H_SHA256), |
|
193 |
|
194 // AES_128(CBC) |
|
195 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256( |
|
196 0xC023, true, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "", |
|
197 ProtocolVersion.PROTOCOLS_OF_12, |
|
198 K_ECDHE_ECDSA, B_AES_128, M_SHA256, H_SHA256), |
|
199 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256( |
|
200 0xC027, true, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "", |
|
201 ProtocolVersion.PROTOCOLS_OF_12, |
|
202 K_ECDHE_RSA, B_AES_128, M_SHA256, H_SHA256), |
|
203 TLS_RSA_WITH_AES_128_CBC_SHA256( |
|
204 0x003C, true, "TLS_RSA_WITH_AES_128_CBC_SHA256", "", |
|
205 ProtocolVersion.PROTOCOLS_OF_12, |
|
206 K_RSA, B_AES_128, M_SHA256, H_SHA256), |
|
207 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256( |
|
208 0xC025, true, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", "", |
|
209 ProtocolVersion.PROTOCOLS_OF_12, |
|
210 K_ECDH_ECDSA, B_AES_128, M_SHA256, H_SHA256), |
|
211 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256( |
|
212 0xC029, true, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", "", |
|
213 ProtocolVersion.PROTOCOLS_OF_12, |
|
214 K_ECDH_RSA, B_AES_128, M_SHA256, H_SHA256), |
|
215 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256( |
|
216 0x0067, true, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", "", |
|
217 ProtocolVersion.PROTOCOLS_OF_12, |
|
218 K_DHE_RSA, B_AES_128, M_SHA256, H_SHA256), |
|
219 TLS_DHE_DSS_WITH_AES_128_CBC_SHA256( |
|
220 0x0040, true, "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", "", |
|
221 ProtocolVersion.PROTOCOLS_OF_12, |
|
222 K_DHE_DSS, B_AES_128, M_SHA256, H_SHA256), |
|
223 |
|
224 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA( |
|
225 0xC009, true, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "", |
|
226 ProtocolVersion.PROTOCOLS_TO_12, |
|
227 K_ECDHE_ECDSA, B_AES_128, M_SHA, H_SHA256), |
|
228 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA( |
|
229 0xC013, true, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "", |
|
230 ProtocolVersion.PROTOCOLS_TO_12, |
|
231 K_ECDHE_RSA, B_AES_128, M_SHA, H_SHA256), |
|
232 TLS_RSA_WITH_AES_128_CBC_SHA( |
|
233 0x002F, true, "TLS_RSA_WITH_AES_128_CBC_SHA", "", |
|
234 ProtocolVersion.PROTOCOLS_TO_12, |
|
235 K_RSA, B_AES_128, M_SHA, H_SHA256), |
|
236 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA( |
|
237 0xC004, true, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", "", |
|
238 ProtocolVersion.PROTOCOLS_TO_12, |
|
239 K_ECDH_ECDSA, B_AES_128, M_SHA, H_SHA256), |
|
240 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA( |
|
241 0xC00E, true, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", "", |
|
242 ProtocolVersion.PROTOCOLS_TO_12, |
|
243 K_ECDH_RSA, B_AES_128, M_SHA, H_SHA256), |
|
244 TLS_DHE_RSA_WITH_AES_128_CBC_SHA( |
|
245 0x0033, true, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", "", |
|
246 ProtocolVersion.PROTOCOLS_TO_12, |
|
247 K_DHE_RSA, B_AES_128, M_SHA, H_SHA256), |
|
248 TLS_DHE_DSS_WITH_AES_128_CBC_SHA( |
|
249 0x0032, true, "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", "", |
|
250 ProtocolVersion.PROTOCOLS_TO_12, |
|
251 K_DHE_DSS, B_AES_128, M_SHA, H_SHA256), |
|
252 |
|
253 // 3DES_EDE |
|
254 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA( |
|
255 0xC008, true, "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", "", |
|
256 ProtocolVersion.PROTOCOLS_TO_12, |
|
257 K_ECDHE_ECDSA, B_3DES, M_SHA, H_SHA256), |
|
258 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA( |
|
259 0xC012, true, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", "", |
|
260 ProtocolVersion.PROTOCOLS_TO_12, |
|
261 K_ECDHE_RSA, B_3DES, M_SHA, H_SHA256), |
|
262 SSL_RSA_WITH_3DES_EDE_CBC_SHA( |
|
263 0x000A, true, "SSL_RSA_WITH_3DES_EDE_CBC_SHA", "", |
|
264 ProtocolVersion.PROTOCOLS_TO_12, |
|
265 K_RSA, B_3DES, M_SHA, H_SHA256), |
|
266 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA( |
|
267 0xC003, true, "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", "", |
|
268 ProtocolVersion.PROTOCOLS_TO_12, |
|
269 K_ECDH_ECDSA, B_3DES, M_SHA, H_SHA256), |
|
270 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA( |
|
271 0xC00D, true, "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", "", |
|
272 ProtocolVersion.PROTOCOLS_TO_12, |
|
273 K_ECDH_RSA, B_3DES, M_SHA, H_SHA256), |
|
274 SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA( |
|
275 0x0016, true, "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", "", |
|
276 ProtocolVersion.PROTOCOLS_TO_12, |
|
277 K_DHE_RSA, B_3DES, M_SHA, H_SHA256), |
|
278 SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA( |
|
279 0x0013, true, "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", "", |
|
280 ProtocolVersion.PROTOCOLS_TO_12, |
|
281 K_DHE_DSS, B_3DES, M_SHA, H_SHA256), |
|
282 |
|
283 // Renegotiation protection request Signalling Cipher Suite Value (SCSV). |
|
284 TLS_EMPTY_RENEGOTIATION_INFO_SCSV( // RFC 5746, TLS 1.2 and prior |
|
285 0x00FF, true, "TLS_EMPTY_RENEGOTIATION_INFO_SCSV", "", |
|
286 ProtocolVersion.PROTOCOLS_TO_12, |
|
287 K_SCSV, B_NULL, M_NULL, H_NONE), |
|
288 |
|
289 // Definition of the CipherSuites that are supported but not enabled |
|
290 // by default. |
|
291 // They are listed in preference order, preferred first, using the |
|
292 // following criteria: |
|
293 // 1. CipherSuites for KRB5 need additional KRB5 service |
|
294 // configuration, and these suites are not common in practice, |
|
295 // so we put KRB5 based cipher suites at the end of the supported |
|
296 // list. |
|
297 // 2. If a cipher suite has been obsoleted, we put it at the end of |
|
298 // the list. |
|
299 // 3. Prefer the stronger bulk cipher, in the order of AES_256, |
|
300 // AES_128, 3DES-EDE, RC-4, DES, DES40, RC4_40, NULL. |
|
301 // 4. Prefer the stronger MAC algorithm, in the order of SHA384, |
|
302 // SHA256, SHA, MD5. |
|
303 // 5. Prefer the better performance of key exchange and digital |
|
304 // signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA, |
|
305 // RSA, ECDH-ECDSA, ECDH-RSA, DHE-RSA, DHE-DSS, anonymous. |
|
306 TLS_DH_anon_WITH_AES_256_GCM_SHA384( |
|
307 0x00A7, false, "TLS_DH_anon_WITH_AES_256_GCM_SHA384", "", |
|
308 ProtocolVersion.PROTOCOLS_OF_12, |
|
309 K_DH_ANON, B_AES_256_GCM, M_NULL, H_SHA384), |
|
310 TLS_DH_anon_WITH_AES_128_GCM_SHA256( |
|
311 0x00A6, false, "TLS_DH_anon_WITH_AES_128_GCM_SHA256", "", |
|
312 ProtocolVersion.PROTOCOLS_OF_12, |
|
313 K_DH_ANON, B_AES_128_GCM, M_NULL, H_SHA256), |
|
314 TLS_DH_anon_WITH_AES_256_CBC_SHA256( |
|
315 0x006D, false, "TLS_DH_anon_WITH_AES_256_CBC_SHA256", "", |
|
316 ProtocolVersion.PROTOCOLS_OF_12, |
|
317 K_DH_ANON, B_AES_256, M_SHA256, H_SHA256), |
|
318 TLS_ECDH_anon_WITH_AES_256_CBC_SHA( |
|
319 0xC019, false, "TLS_ECDH_anon_WITH_AES_256_CBC_SHA", "", |
|
320 ProtocolVersion.PROTOCOLS_TO_12, |
|
321 K_ECDH_ANON, B_AES_256, M_SHA, H_SHA256), |
|
322 TLS_DH_anon_WITH_AES_256_CBC_SHA( |
|
323 0x003A, false, "TLS_DH_anon_WITH_AES_256_CBC_SHA", "", |
|
324 ProtocolVersion.PROTOCOLS_TO_12, |
|
325 K_DH_ANON, B_AES_256, M_SHA, H_SHA256), |
|
326 TLS_DH_anon_WITH_AES_128_CBC_SHA256( |
|
327 0x006C, false, "TLS_DH_anon_WITH_AES_128_CBC_SHA256", "", |
|
328 ProtocolVersion.PROTOCOLS_OF_12, |
|
329 K_DH_ANON, B_AES_128, M_SHA256, H_SHA256), |
|
330 TLS_ECDH_anon_WITH_AES_128_CBC_SHA( |
|
331 0xC018, false, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA", "", |
|
332 ProtocolVersion.PROTOCOLS_TO_12, |
|
333 K_ECDH_ANON, B_AES_128, M_SHA, H_SHA256), |
|
334 TLS_DH_anon_WITH_AES_128_CBC_SHA( |
|
335 0x0034, false, "TLS_DH_anon_WITH_AES_128_CBC_SHA", "", |
|
336 ProtocolVersion.PROTOCOLS_TO_12, |
|
337 K_DH_ANON, B_AES_128, M_SHA, H_SHA256), |
|
338 TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA( |
|
339 0xC017, false, "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", "", |
|
340 ProtocolVersion.PROTOCOLS_TO_12, |
|
341 K_ECDH_ANON, B_3DES, M_SHA, H_SHA256), |
|
342 SSL_DH_anon_WITH_3DES_EDE_CBC_SHA( |
|
343 0x001B, false, "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", "", |
|
344 ProtocolVersion.PROTOCOLS_TO_12, |
|
345 K_DH_ANON, B_3DES, M_SHA, H_SHA256), |
|
346 |
|
347 // RC-4 |
|
348 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA( |
|
349 0xC007, false, "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", "", |
|
350 ProtocolVersion.PROTOCOLS_TO_12, |
|
351 K_ECDHE_ECDSA, B_RC4_128, M_SHA, H_SHA256), |
|
352 TLS_ECDHE_RSA_WITH_RC4_128_SHA( |
|
353 0xC011, false, "TLS_ECDHE_RSA_WITH_RC4_128_SHA", "", |
|
354 ProtocolVersion.PROTOCOLS_TO_12, |
|
355 K_ECDHE_RSA, B_RC4_128, M_SHA, H_SHA256), |
|
356 SSL_RSA_WITH_RC4_128_SHA( |
|
357 0x0005, false, "SSL_RSA_WITH_RC4_128_SHA", "", |
|
358 ProtocolVersion.PROTOCOLS_TO_12, |
|
359 K_RSA, B_RC4_128, M_SHA, H_SHA256), |
|
360 TLS_ECDH_ECDSA_WITH_RC4_128_SHA( |
|
361 0xC002, false, "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", "", |
|
362 ProtocolVersion.PROTOCOLS_TO_12, |
|
363 K_ECDH_ECDSA, B_RC4_128, M_SHA, H_SHA256), |
|
364 TLS_ECDH_RSA_WITH_RC4_128_SHA( |
|
365 0xC00C, false, "TLS_ECDH_RSA_WITH_RC4_128_SHA", "", |
|
366 ProtocolVersion.PROTOCOLS_TO_12, |
|
367 K_ECDH_RSA, B_RC4_128, M_SHA, H_SHA256), |
|
368 SSL_RSA_WITH_RC4_128_MD5( |
|
369 0x0004, false, "SSL_RSA_WITH_RC4_128_MD5", "", |
|
370 ProtocolVersion.PROTOCOLS_TO_12, |
|
371 K_RSA, B_RC4_128, M_MD5, H_SHA256), |
|
372 TLS_ECDH_anon_WITH_RC4_128_SHA( |
|
373 0xC016, false, "TLS_ECDH_anon_WITH_RC4_128_SHA", "", |
|
374 ProtocolVersion.PROTOCOLS_TO_12, |
|
375 K_ECDH_ANON, B_RC4_128, M_SHA, H_SHA256), |
|
376 SSL_DH_anon_WITH_RC4_128_MD5( |
|
377 0x0018, false, "SSL_DH_anon_WITH_RC4_128_MD5", "", |
|
378 ProtocolVersion.PROTOCOLS_TO_12, |
|
379 K_DH_ANON, B_RC4_128, M_MD5, H_SHA256), |
|
380 |
|
381 // weak cipher suites obsoleted in TLS 1.2 |
|
382 SSL_RSA_WITH_DES_CBC_SHA( |
|
383 0x0009, false, "SSL_RSA_WITH_DES_CBC_SHA", "", |
|
384 ProtocolVersion.PROTOCOLS_TO_11, |
|
385 K_RSA, B_DES, M_SHA, H_NONE), |
|
386 SSL_DHE_RSA_WITH_DES_CBC_SHA( |
|
387 0x0015, false, "SSL_DHE_RSA_WITH_DES_CBC_SHA", "", |
|
388 ProtocolVersion.PROTOCOLS_TO_11, |
|
389 K_DHE_RSA, B_DES, M_SHA, H_NONE), |
|
390 SSL_DHE_DSS_WITH_DES_CBC_SHA( |
|
391 0x0012, false, "SSL_DHE_DSS_WITH_DES_CBC_SHA", "", |
|
392 ProtocolVersion.PROTOCOLS_TO_11, |
|
393 K_DHE_DSS, B_DES, M_SHA, H_NONE), |
|
394 SSL_DH_anon_WITH_DES_CBC_SHA( |
|
395 0x001A, false, "SSL_DH_anon_WITH_DES_CBC_SHA", "", |
|
396 ProtocolVersion.PROTOCOLS_TO_11, |
|
397 K_DH_ANON, B_DES, M_SHA, H_NONE), |
|
398 |
|
399 // weak cipher suites obsoleted in TLS 1.1 |
|
400 SSL_RSA_EXPORT_WITH_DES40_CBC_SHA( |
|
401 0x0008, false, "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", "", |
|
402 ProtocolVersion.PROTOCOLS_TO_10, |
|
403 K_RSA_EXPORT, B_DES_40, M_SHA, H_NONE), |
|
404 SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA( |
|
405 0x0014, false, "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", "", |
|
406 ProtocolVersion.PROTOCOLS_TO_10, |
|
407 K_DHE_RSA_EXPORT, B_DES_40, M_SHA, H_NONE), |
|
408 SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA( |
|
409 0x0011, false, "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", "", |
|
410 ProtocolVersion.PROTOCOLS_TO_10, |
|
411 K_DHE_DSS_EXPORT, B_DES_40, M_SHA, H_NONE), |
|
412 SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA( |
|
413 0x0019, false, "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", "", |
|
414 ProtocolVersion.PROTOCOLS_TO_10, |
|
415 K_DH_ANON_EXPORT, B_DES_40, M_SHA, H_NONE), |
|
416 SSL_RSA_EXPORT_WITH_RC4_40_MD5( |
|
417 0x0003, false, "SSL_RSA_EXPORT_WITH_RC4_40_MD5", "", |
|
418 ProtocolVersion.PROTOCOLS_TO_10, |
|
419 K_RSA_EXPORT, B_DES_40, M_MD5, H_NONE), |
|
420 SSL_DH_anon_EXPORT_WITH_RC4_40_MD5( |
|
421 0x0017, false, "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", "", |
|
422 ProtocolVersion.PROTOCOLS_TO_10, |
|
423 K_DH_ANON, B_DES_40, M_MD5, H_NONE), |
|
424 |
|
425 // no traffic encryption cipher suites |
|
426 TLS_RSA_WITH_NULL_SHA256( |
|
427 0x003B, false, "TLS_RSA_WITH_NULL_SHA256", "", |
|
428 ProtocolVersion.PROTOCOLS_OF_12, |
|
429 K_RSA, B_NULL, M_SHA256, H_SHA256), |
|
430 TLS_ECDHE_ECDSA_WITH_NULL_SHA( |
|
431 0xC006, false, "TLS_ECDHE_ECDSA_WITH_NULL_SHA", "", |
|
432 ProtocolVersion.PROTOCOLS_TO_12, |
|
433 K_ECDHE_ECDSA, B_NULL, M_SHA, H_SHA256), |
|
434 TLS_ECDHE_RSA_WITH_NULL_SHA( |
|
435 0xC010, false, "TLS_ECDHE_RSA_WITH_NULL_SHA", "", |
|
436 ProtocolVersion.PROTOCOLS_TO_12, |
|
437 K_ECDHE_RSA, B_NULL, M_SHA, H_SHA256), |
|
438 SSL_RSA_WITH_NULL_SHA( |
|
439 0x0002, false, "SSL_RSA_WITH_NULL_SHA", "", |
|
440 ProtocolVersion.PROTOCOLS_TO_12, |
|
441 K_RSA, B_NULL, M_SHA, H_SHA256), |
|
442 TLS_ECDH_ECDSA_WITH_NULL_SHA( |
|
443 0xC001, false, "TLS_ECDH_ECDSA_WITH_NULL_SHA", "", |
|
444 ProtocolVersion.PROTOCOLS_TO_12, |
|
445 K_ECDH_ECDSA, B_NULL, M_SHA, H_SHA256), |
|
446 TLS_ECDH_RSA_WITH_NULL_SHA( |
|
447 0xC00B, false, "TLS_ECDH_RSA_WITH_NULL_SHA", "", |
|
448 ProtocolVersion.PROTOCOLS_TO_12, |
|
449 K_ECDH_RSA, B_NULL, M_SHA, H_SHA256), |
|
450 TLS_ECDH_anon_WITH_NULL_SHA( |
|
451 0xC015, false, "TLS_ECDH_anon_WITH_NULL_SHA", "", |
|
452 ProtocolVersion.PROTOCOLS_TO_12, |
|
453 K_ECDH_ANON, B_NULL, M_SHA, H_SHA256), |
|
454 SSL_RSA_WITH_NULL_MD5( |
|
455 0x0001, false, "SSL_RSA_WITH_NULL_MD5", "", |
|
456 ProtocolVersion.PROTOCOLS_TO_12, |
|
457 K_RSA, B_NULL, M_MD5, H_SHA256), |
|
458 |
|
459 // supported Kerberos ciphersuites from RFC2712 |
|
460 TLS_KRB5_WITH_3DES_EDE_CBC_SHA( |
|
461 0x001F, false, "TLS_KRB5_WITH_3DES_EDE_CBC_SHA", "", |
|
462 ProtocolVersion.PROTOCOLS_TO_12, |
|
463 K_KRB5, B_3DES, M_SHA, H_SHA256), |
|
464 TLS_KRB5_WITH_3DES_EDE_CBC_MD5( |
|
465 0x0023, false, "TLS_KRB5_WITH_3DES_EDE_CBC_MD5", "", |
|
466 ProtocolVersion.PROTOCOLS_TO_12, |
|
467 K_KRB5, B_3DES, M_MD5, H_SHA256), |
|
468 TLS_KRB5_WITH_RC4_128_SHA( |
|
469 0x0020, false, "TLS_KRB5_WITH_RC4_128_SHA", "", |
|
470 ProtocolVersion.PROTOCOLS_TO_12, |
|
471 K_KRB5, B_RC4_128, M_SHA, H_SHA256), |
|
472 TLS_KRB5_WITH_RC4_128_MD5( |
|
473 0x0024, false, "TLS_KRB5_WITH_RC4_128_MD5", "", |
|
474 ProtocolVersion.PROTOCOLS_TO_12, |
|
475 K_KRB5, B_RC4_128, M_MD5, H_SHA256), |
|
476 TLS_KRB5_WITH_DES_CBC_SHA( |
|
477 0x001e, false, "TLS_KRB5_WITH_DES_CBC_SHA", "", |
|
478 ProtocolVersion.PROTOCOLS_TO_11, |
|
479 K_KRB5, B_DES, M_SHA, H_NONE), |
|
480 TLS_KRB5_WITH_DES_CBC_MD5( |
|
481 0x0022, false, "TLS_KRB5_WITH_DES_CBC_MD5", "", |
|
482 ProtocolVersion.PROTOCOLS_TO_11, |
|
483 K_KRB5, B_DES, M_MD5, H_NONE), |
|
484 TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA( |
|
485 0x0026, false, "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", "", |
|
486 ProtocolVersion.PROTOCOLS_TO_10, |
|
487 K_KRB5_EXPORT, B_DES_40, M_SHA, H_NONE), |
|
488 TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5( |
|
489 0x0029, false, "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", "", |
|
490 ProtocolVersion.PROTOCOLS_TO_10, |
|
491 K_KRB5_EXPORT, B_DES_40, M_MD5, H_NONE), |
|
492 TLS_KRB5_EXPORT_WITH_RC4_40_SHA( |
|
493 0x0028, false, "TLS_KRB5_EXPORT_WITH_RC4_40_SHA", "", |
|
494 ProtocolVersion.PROTOCOLS_TO_10, |
|
495 K_KRB5_EXPORT, B_RC4_40, M_SHA, H_NONE), |
|
496 TLS_KRB5_EXPORT_WITH_RC4_40_MD5( |
|
497 0x002B, false, "TLS_KRB5_EXPORT_WITH_RC4_40_MD5", "", |
|
498 ProtocolVersion.PROTOCOLS_TO_10, |
|
499 K_KRB5_EXPORT, B_RC4_40, M_MD5, H_NONE), |
|
500 |
|
501 // Other values from the TLS Cipher Suite Registry, as of August 2010. |
|
502 // |
|
503 // http://www.iana.org/assignments/tls-parameters/tls-parameters.xml |
|
504 // |
|
505 // Range Registration Procedures Notes |
|
506 // 000-191 Standards Action Refers to value of first byte |
|
507 // 192-254 Specification Required Refers to value of first byte |
|
508 // 255 Reserved for Private Use Refers to value of first byte |
|
509 |
|
510 TLS_CHACHA20_POLY1305_SHA256( // TLS 1.3 |
|
511 "TLS_CHACHA20_POLY1305_SHA256", 0x1303), |
|
512 TLS_AES_128_CCM_SHA256( // TLS 1.3 |
|
513 "TLS_AES_128_CCM_SHA256", 0x1304), |
|
514 TLS_AES_128_CCM_8_SHA256( // TLS 1.3 |
|
515 "TLS_AES_128_CCM_8_SHA256", 0x1305), |
|
516 |
|
517 // remaining unsupported ciphersuites defined in RFC2246. |
|
518 CS_0006("SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5", 0x0006), |
|
519 CS_0007("SSL_RSA_WITH_IDEA_CBC_SHA", 0x0007), |
|
520 CS_000B("SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x000b), |
|
521 CS_000C("SSL_DH_DSS_WITH_DES_CBC_SHA", 0x000c), |
|
522 CS_000D("SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA", 0x000d), |
|
523 CS_000E("SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x000e), |
|
524 CS_000F("SSL_DH_RSA_WITH_DES_CBC_SHA", 0x000f), |
|
525 CS_0010("SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA", 0x0010), |
|
526 |
|
527 // SSL 3.0 Fortezza ciphersuites |
|
528 CS_001C("SSL_FORTEZZA_DMS_WITH_NULL_SHA", 0x001c), |
|
529 CS_001D("SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA", 0x001d), |
|
530 |
|
531 // 1024/56 bit exportable ciphersuites from expired internet draft |
|
532 CS_0062("SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA", 0x0062), |
|
533 CS_0063("SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA", 0x0063), |
|
534 CS_0064("SSL_RSA_EXPORT1024_WITH_RC4_56_SHA", 0x0064), |
|
535 CS_0065("SSL_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA", 0x0065), |
|
536 CS_0066("SSL_DHE_DSS_WITH_RC4_128_SHA", 0x0066), |
|
537 |
|
538 // Netscape old and new SSL 3.0 FIPS ciphersuites |
|
539 // see http://www.mozilla.org/projects/security/pki/nss/ssl/fips-ssl-ciphersuites.html |
|
540 CS_FFE0("NETSCAPE_RSA_FIPS_WITH_3DES_EDE_CBC_SHA", 0xffe0), |
|
541 CS_FFE1("NETSCAPE_RSA_FIPS_WITH_DES_CBC_SHA", 0xffe1), |
|
542 CS_FEFE("SSL_RSA_FIPS_WITH_DES_CBC_SHA", 0xfefe), |
|
543 CS_FEFF("SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA", 0xfeff), |
|
544 |
|
545 // Unsupported Kerberos cipher suites from RFC 2712 |
|
546 CS_0021("TLS_KRB5_WITH_IDEA_CBC_SHA", 0x0021), |
|
547 CS_0025("TLS_KRB5_WITH_IDEA_CBC_MD5", 0x0025), |
|
548 CS_0027("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA", 0x0027), |
|
549 CS_002A("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5", 0x002a), |
|
550 |
|
551 // Unsupported cipher suites from RFC 4162 |
|
552 CS_0096("TLS_RSA_WITH_SEED_CBC_SHA", 0x0096), |
|
553 CS_0097("TLS_DH_DSS_WITH_SEED_CBC_SHA", 0x0097), |
|
554 CS_0098("TLS_DH_RSA_WITH_SEED_CBC_SHA", 0x0098), |
|
555 CS_0099("TLS_DHE_DSS_WITH_SEED_CBC_SHA", 0x0099), |
|
556 CS_009A("TLS_DHE_RSA_WITH_SEED_CBC_SHA", 0x009a), |
|
557 CS_009B("TLS_DH_anon_WITH_SEED_CBC_SHA", 0x009b), |
|
558 |
|
559 // Unsupported cipher suites from RFC 4279 |
|
560 CS_008A("TLS_PSK_WITH_RC4_128_SHA", 0x008a), |
|
561 CS_008B("TLS_PSK_WITH_3DES_EDE_CBC_SHA", 0x008b), |
|
562 CS_008C("TLS_PSK_WITH_AES_128_CBC_SHA", 0x008c), |
|
563 CS_008D("TLS_PSK_WITH_AES_256_CBC_SHA", 0x008d), |
|
564 CS_008E("TLS_DHE_PSK_WITH_RC4_128_SHA", 0x008e), |
|
565 CS_008F("TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA", 0x008f), |
|
566 CS_0090("TLS_DHE_PSK_WITH_AES_128_CBC_SHA", 0x0090), |
|
567 CS_0091("TLS_DHE_PSK_WITH_AES_256_CBC_SHA", 0x0091), |
|
568 CS_0092("TLS_RSA_PSK_WITH_RC4_128_SHA", 0x0092), |
|
569 CS_0093("TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA", 0x0093), |
|
570 CS_0094("TLS_RSA_PSK_WITH_AES_128_CBC_SHA", 0x0094), |
|
571 CS_0095("TLS_RSA_PSK_WITH_AES_256_CBC_SHA", 0x0095), |
|
572 |
|
573 // Unsupported cipher suites from RFC 4785 |
|
574 CS_002C("TLS_PSK_WITH_NULL_SHA", 0x002c), |
|
575 CS_002D("TLS_DHE_PSK_WITH_NULL_SHA", 0x002d), |
|
576 CS_002E("TLS_RSA_PSK_WITH_NULL_SHA", 0x002e), |
|
577 |
|
578 // Unsupported cipher suites from RFC 5246 |
|
579 CS_0030("TLS_DH_DSS_WITH_AES_128_CBC_SHA", 0x0030), |
|
580 CS_0031("TLS_DH_RSA_WITH_AES_128_CBC_SHA", 0x0031), |
|
581 CS_0036("TLS_DH_DSS_WITH_AES_256_CBC_SHA", 0x0036), |
|
582 CS_0037("TLS_DH_RSA_WITH_AES_256_CBC_SHA", 0x0037), |
|
583 CS_003E("TLS_DH_DSS_WITH_AES_128_CBC_SHA256", 0x003e), |
|
584 CS_003F("TLS_DH_RSA_WITH_AES_128_CBC_SHA256", 0x003f), |
|
585 CS_0068("TLS_DH_DSS_WITH_AES_256_CBC_SHA256", 0x0068), |
|
586 CS_0069("TLS_DH_RSA_WITH_AES_256_CBC_SHA256", 0x0069), |
|
587 |
|
588 // Unsupported cipher suites from RFC 5288 |
|
589 CS_00A0("TLS_DH_RSA_WITH_AES_128_GCM_SHA256", 0x00a0), |
|
590 CS_00A1("TLS_DH_RSA_WITH_AES_256_GCM_SHA384", 0x00a1), |
|
591 CS_00A4("TLS_DH_DSS_WITH_AES_128_GCM_SHA256", 0x00a4), |
|
592 CS_00A5("TLS_DH_DSS_WITH_AES_256_GCM_SHA384", 0x00a5), |
|
593 |
|
594 // Unsupported cipher suites from RFC 5487 |
|
595 CS_00A8("TLS_PSK_WITH_AES_128_GCM_SHA256", 0x00a8), |
|
596 CS_00A9("TLS_PSK_WITH_AES_256_GCM_SHA384", 0x00a9), |
|
597 CS_00AA("TLS_DHE_PSK_WITH_AES_128_GCM_SHA256", 0x00aa), |
|
598 CS_00AB("TLS_DHE_PSK_WITH_AES_256_GCM_SHA384", 0x00ab), |
|
599 CS_00AC("TLS_RSA_PSK_WITH_AES_128_GCM_SHA256", 0x00ac), |
|
600 CS_00AD("TLS_RSA_PSK_WITH_AES_256_GCM_SHA384", 0x00ad), |
|
601 CS_00AE("TLS_PSK_WITH_AES_128_CBC_SHA256", 0x00ae), |
|
602 CS_00AF("TLS_PSK_WITH_AES_256_CBC_SHA384", 0x00af), |
|
603 CS_00B0("TLS_PSK_WITH_NULL_SHA256", 0x00b0), |
|
604 CS_00B1("TLS_PSK_WITH_NULL_SHA384", 0x00b1), |
|
605 CS_00B2("TLS_DHE_PSK_WITH_AES_128_CBC_SHA256", 0x00b2), |
|
606 CS_00B3("TLS_DHE_PSK_WITH_AES_256_CBC_SHA384", 0x00b3), |
|
607 CS_00B4("TLS_DHE_PSK_WITH_NULL_SHA256", 0x00b4), |
|
608 CS_00B5("TLS_DHE_PSK_WITH_NULL_SHA384", 0x00b5), |
|
609 CS_00B6("TLS_RSA_PSK_WITH_AES_128_CBC_SHA256", 0x00b6), |
|
610 CS_00B7("TLS_RSA_PSK_WITH_AES_256_CBC_SHA384", 0x00b7), |
|
611 CS_00B8("TLS_RSA_PSK_WITH_NULL_SHA256", 0x00b8), |
|
612 CS_00B9("TLS_RSA_PSK_WITH_NULL_SHA384", 0x00b9), |
|
613 |
|
614 // Unsupported cipher suites from RFC 5932 |
|
615 CS_0041("TLS_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0041), |
|
616 CS_0042("TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA", 0x0042), |
|
617 CS_0043("TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0043), |
|
618 CS_0044("TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA", 0x0044), |
|
619 CS_0045("TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0045), |
|
620 CS_0046("TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA", 0x0046), |
|
621 CS_0084("TLS_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0084), |
|
622 CS_0085("TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA", 0x0085), |
|
623 CS_0086("TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0086), |
|
624 CS_0087("TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA", 0x0087), |
|
625 CS_0088("TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0088), |
|
626 CS_0089("TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA", 0x0089), |
|
627 CS_00BA("TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00ba), |
|
628 CS_00BB("TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256", 0x00bb), |
|
629 CS_00BC("TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00bc), |
|
630 CS_00BD("TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256", 0x00bd), |
|
631 CS_00BE("TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00be), |
|
632 CS_00BF("TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256", 0x00bf), |
|
633 CS_00C0("TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c0), |
|
634 CS_00C1("TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256", 0x00c1), |
|
635 CS_00C2("TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c2), |
|
636 CS_00C3("TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256", 0x00c3), |
|
637 CS_00C4("TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c4), |
|
638 CS_00C5("TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256", 0x00c5), |
|
639 |
|
640 // TLS Fallback Signaling Cipher Suite Value (SCSV) RFC 7507 |
|
641 CS_5600("TLS_FALLBACK_SCSV", 0x5600), |
|
642 |
|
643 // Unsupported cipher suites from RFC 5054 |
|
644 CS_C01A("TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA", 0xc01a), |
|
645 CS_C01B("TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA", 0xc01b), |
|
646 CS_C01C("TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA", 0xc01c), |
|
647 CS_C01D("TLS_SRP_SHA_WITH_AES_128_CBC_SHA", 0xc01d), |
|
648 CS_C01E("TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA", 0xc01e), |
|
649 CS_C01F("TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA", 0xc01f), |
|
650 CS_C020("TLS_SRP_SHA_WITH_AES_256_CBC_SHA", 0xc020), |
|
651 CS_C021("TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA", 0xc021), |
|
652 CS_C022("TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA", 0xc022), |
|
653 |
|
654 // Unsupported cipher suites from RFC 5489 |
|
655 CS_C033("TLS_ECDHE_PSK_WITH_RC4_128_SHA", 0xc033), |
|
656 CS_C034("TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA", 0xc034), |
|
657 CS_C035("TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", 0xc035), |
|
658 CS_C036("TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", 0xc036), |
|
659 CS_C037("TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256", 0xc037), |
|
660 CS_C038("TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384", 0xc038), |
|
661 CS_C039("TLS_ECDHE_PSK_WITH_NULL_SHA", 0xc039), |
|
662 CS_C03A("TLS_ECDHE_PSK_WITH_NULL_SHA256", 0xc03a), |
|
663 CS_C03B("TLS_ECDHE_PSK_WITH_NULL_SHA384", 0xc03b), |
|
664 |
|
665 // Unsupported cipher suites from RFC 6209 |
|
666 CS_C03C("TLS_RSA_WITH_ARIA_128_CBC_SHA256", 0xc03c), |
|
667 CS_C03D("TLS_RSA_WITH_ARIA_256_CBC_SHA384", 0xc03d), |
|
668 CS_C03E("TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256", 0xc03e), |
|
669 CS_C03F("TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384", 0xc03f), |
|
670 CS_C040("TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256", 0xc040), |
|
671 CS_C041("TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384", 0xc041), |
|
672 CS_C042("TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256", 0xc042), |
|
673 CS_C043("TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384", 0xc043), |
|
674 CS_C044("TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256", 0xc044), |
|
675 CS_C045("TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384", 0xc045), |
|
676 CS_C046("TLS_DH_anon_WITH_ARIA_128_CBC_SHA256", 0xc046), |
|
677 CS_C047("TLS_DH_anon_WITH_ARIA_256_CBC_SHA384", 0xc047), |
|
678 CS_C048("TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256", 0xc048), |
|
679 CS_C049("TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384", 0xc049), |
|
680 CS_C04A("TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256", 0xc04a), |
|
681 CS_C04B("TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384", 0xc04b), |
|
682 CS_C04C("TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256", 0xc04c), |
|
683 CS_C04D("TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384", 0xc04d), |
|
684 CS_C04E("TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256", 0xc04e), |
|
685 CS_C04F("TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384", 0xc04f), |
|
686 CS_C050("TLS_RSA_WITH_ARIA_128_GCM_SHA256", 0xc050), |
|
687 CS_C051("TLS_RSA_WITH_ARIA_256_GCM_SHA384", 0xc051), |
|
688 CS_C052("TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256", 0xc052), |
|
689 CS_C053("TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384", 0xc053), |
|
690 CS_C054("TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256", 0xc054), |
|
691 CS_C055("TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384", 0xc055), |
|
692 CS_C056("TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256", 0xc056), |
|
693 CS_C057("TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384", 0xc057), |
|
694 CS_C058("TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256", 0xc058), |
|
695 CS_C059("TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384", 0xc059), |
|
696 CS_C05A("TLS_DH_anon_WITH_ARIA_128_GCM_SHA256", 0xc05a), |
|
697 CS_C05B("TLS_DH_anon_WITH_ARIA_256_GCM_SHA384", 0xc05b), |
|
698 CS_C05C("TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256", 0xc05c), |
|
699 CS_C05D("TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384", 0xc05d), |
|
700 CS_C05E("TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256", 0xc05e), |
|
701 CS_C05F("TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384", 0xc05f), |
|
702 CS_C060("TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256", 0xc060), |
|
703 CS_C061("TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384", 0xc061), |
|
704 CS_C062("TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256", 0xc062), |
|
705 CS_C063("TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384", 0xc063), |
|
706 CS_C064("TLS_PSK_WITH_ARIA_128_CBC_SHA256", 0xc064), |
|
707 CS_C065("TLS_PSK_WITH_ARIA_256_CBC_SHA384", 0xc065), |
|
708 CS_C066("TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256", 0xc066), |
|
709 CS_C067("TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384", 0xc067), |
|
710 CS_C068("TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256", 0xc068), |
|
711 CS_C069("TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384", 0xc069), |
|
712 CS_C06A("TLS_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06a), |
|
713 CS_C06B("TLS_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06b), |
|
714 CS_C06C("TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06c), |
|
715 CS_C06D("TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06d), |
|
716 CS_C06E("TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06e), |
|
717 CS_C06F("TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06f), |
|
718 CS_C070("TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256", 0xc070), |
|
719 CS_C071("TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384", 0xc071), |
|
720 |
|
721 // Unsupported cipher suites from RFC 6367 |
|
722 CS_C072("TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc072), |
|
723 CS_C073("TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc073), |
|
724 CS_C074("TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc074), |
|
725 CS_C075("TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc075), |
|
726 CS_C076("TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc076), |
|
727 CS_C077("TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc077), |
|
728 CS_C078("TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc078), |
|
729 CS_C079("TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc079), |
|
730 CS_C07A("TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07a), |
|
731 CS_C07B("TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07b), |
|
732 CS_C07C("TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07c), |
|
733 CS_C07D("TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07d), |
|
734 CS_C07E("TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07e), |
|
735 CS_C07F("TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07f), |
|
736 CS_C080("TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256", 0xc080), |
|
737 CS_C081("TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384", 0xc081), |
|
738 CS_C082("TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256", 0xc082), |
|
739 CS_C083("TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384", 0xc083), |
|
740 CS_C084("TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256", 0xc084), |
|
741 CS_C085("TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384", 0xc085), |
|
742 CS_C086("TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc086), |
|
743 CS_C087("TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc087), |
|
744 CS_C088("TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc088), |
|
745 CS_C089("TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc089), |
|
746 CS_C08A("TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc08a), |
|
747 CS_C08B("TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc08b), |
|
748 CS_C08C("TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc08c), |
|
749 CS_C08D("TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc08d), |
|
750 CS_C08E("TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc08e), |
|
751 CS_C08F("TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc08f), |
|
752 CS_C090("TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc090), |
|
753 CS_C091("TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc091), |
|
754 CS_C092("TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc092), |
|
755 CS_C093("TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc093), |
|
756 CS_C094("TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc094), |
|
757 CS_C095("TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc095), |
|
758 CS_C096("TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc096), |
|
759 CS_C097("TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc097), |
|
760 CS_C098("TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc098), |
|
761 CS_C099("TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc099), |
|
762 CS_C09A("TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc09a), |
|
763 CS_C09B("TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc09b), |
|
764 |
|
765 // Unsupported cipher suites from RFC 6655 |
|
766 CS_C09C("TLS_RSA_WITH_AES_128_CCM", 0xc09c), |
|
767 CS_C09D("TLS_RSA_WITH_AES_256_CCM", 0xc09d), |
|
768 CS_C09E("TLS_DHE_RSA_WITH_AES_128_CCM", 0xc09e), |
|
769 CS_C09F("TLS_DHE_RSA_WITH_AES_256_CCM", 0xc09f), |
|
770 CS_C0A0("TLS_RSA_WITH_AES_128_CCM_8", 0xc0A0), |
|
771 CS_C0A1("TLS_RSA_WITH_AES_256_CCM_8", 0xc0A1), |
|
772 CS_C0A2("TLS_DHE_RSA_WITH_AES_128_CCM_8", 0xc0A2), |
|
773 CS_C0A3("TLS_DHE_RSA_WITH_AES_256_CCM_8", 0xc0A3), |
|
774 CS_C0A4("TLS_PSK_WITH_AES_128_CCM", 0xc0A4), |
|
775 CS_C0A5("TLS_PSK_WITH_AES_256_CCM", 0xc0A5), |
|
776 CS_C0A6("TLS_DHE_PSK_WITH_AES_128_CCM", 0xc0A6), |
|
777 CS_C0A7("TLS_DHE_PSK_WITH_AES_256_CCM", 0xc0A7), |
|
778 CS_C0A8("TLS_PSK_WITH_AES_128_CCM_8", 0xc0A8), |
|
779 CS_C0A9("TLS_PSK_WITH_AES_256_CCM_8", 0xc0A9), |
|
780 CS_C0AA("TLS_PSK_DHE_WITH_AES_128_CCM_8", 0xc0Aa), |
|
781 CS_C0AB("TLS_PSK_DHE_WITH_AES_256_CCM_8", 0xc0Ab), |
|
782 |
|
783 // Unsupported cipher suites from RFC 7251 |
|
784 CS_C0AC("TLS_ECDHE_ECDSA_WITH_AES_128_CCM", 0xc0Ac), |
|
785 CS_C0AD("TLS_ECDHE_ECDSA_WITH_AES_256_CCM", 0xc0Ad), |
|
786 CS_C0AE("TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", 0xc0Ae), |
|
787 CS_C0AF("TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", 0xc0Af), |
|
788 |
|
789 C_NULL("SSL_NULL_WITH_NULL_NULL", 0x0000); |
|
790 |
|
791 final int id; |
|
792 final boolean isDefaultEnabled; |
94 final String name; |
793 final String name; |
95 |
794 final List<String> aliases; |
96 // id in 16 bit MSB format, i.e. 0x0004 for SSL_RSA_WITH_RC4_128_MD5 |
795 final List<ProtocolVersion> supportedProtocols; |
97 final int id; |
|
98 |
|
99 // priority for the internal default preference order. the higher the |
|
100 // better. Each supported CipherSuite *must* have a unique priority. |
|
101 // Ciphersuites with priority >= DEFAULT_SUITES_PRIORITY are enabled |
|
102 // by default |
|
103 final int priority; |
|
104 |
|
105 // key exchange, bulk cipher, mac and prf algorithms. See those |
|
106 // classes below. |
|
107 final KeyExchange keyExchange; |
796 final KeyExchange keyExchange; |
108 final BulkCipher cipher; |
797 final SSLCipher bulkCipher; |
109 final MacAlg macAlg; |
798 final MacAlg macAlg; |
110 final PRF prfAlg; |
799 final HashAlg hashAlg; |
111 |
800 |
112 // whether a CipherSuite qualifies as exportable under 512/40 bit rules. |
|
113 // TLS 1.1+ (RFC 4346) must not negotiate to these suites. |
|
114 final boolean exportable; |
801 final boolean exportable; |
115 |
802 |
116 // true iff implemented and enabled at compile time |
803 // known but unsupported cipher suite |
117 final boolean allowed; |
804 private CipherSuite(String name, int id) { |
118 |
805 this(id, false, name, "", |
119 // obsoleted since protocol version |
806 ProtocolVersion.PROTOCOLS_EMPTY, null, null, null, null); |
120 // |
807 } |
121 // TLS version is used. If checking DTLS versions, please map to |
808 |
122 // TLS version firstly. See ProtocolVersion.mapToTLSProtocol(). |
809 // TLS 1.3 cipher suite |
123 final int obsoleted; |
810 private CipherSuite(int id, boolean isDefaultEnabled, |
124 |
811 String name, ProtocolVersion[] supportedProtocols, |
125 // supported since protocol version (TLS version is used) |
812 SSLCipher bulkCipher, HashAlg hashAlg) { |
126 // |
813 this(id, isDefaultEnabled, name, "", |
127 // TLS version is used. If checking DTLS versions, please map to |
814 supportedProtocols, null, bulkCipher, M_NULL, hashAlg); |
128 // TLS version firstly. See ProtocolVersion.mapToTLSProtocol(). |
815 } |
129 final int supported; |
816 |
|
817 private CipherSuite(int id, boolean isDefaultEnabled, |
|
818 String name, String aliases, |
|
819 ProtocolVersion[] supportedProtocols, |
|
820 KeyExchange keyExchange, SSLCipher cipher, |
|
821 MacAlg macAlg, HashAlg hashAlg) { |
|
822 this.id = id; |
|
823 this.isDefaultEnabled = isDefaultEnabled; |
|
824 this.name = name; |
|
825 if (aliases.isEmpty()) { |
|
826 this.aliases = Arrays.asList(aliases.split(",")); |
|
827 } else { |
|
828 this.aliases = Collections.emptyList(); |
|
829 } |
|
830 this.supportedProtocols = Arrays.asList(supportedProtocols); |
|
831 this.keyExchange = keyExchange; |
|
832 this.bulkCipher = cipher; |
|
833 this.macAlg = macAlg; |
|
834 this.hashAlg = hashAlg; |
|
835 |
|
836 this.exportable = (cipher == null ? false : cipher.exportable); |
|
837 } |
|
838 |
|
839 static CipherSuite nameOf(String ciperSuiteName) { |
|
840 for (CipherSuite cs : CipherSuite.values()) { |
|
841 if (cs.name.equals(ciperSuiteName) || |
|
842 cs.aliases.contains(ciperSuiteName)) { |
|
843 return cs; |
|
844 } |
|
845 } |
|
846 |
|
847 return null; |
|
848 } |
|
849 |
|
850 static CipherSuite valueOf(int id) { |
|
851 for (CipherSuite cs : CipherSuite.values()) { |
|
852 if (cs.id == id) { |
|
853 return cs; |
|
854 } |
|
855 } |
|
856 |
|
857 return null; |
|
858 } |
|
859 |
|
860 static String nameOf(int id) { |
|
861 for (CipherSuite cs : CipherSuite.values()) { |
|
862 if (cs.id == id) { |
|
863 return cs.name; |
|
864 } |
|
865 } |
|
866 |
|
867 return "UNKNOWN-CIPHER-SUITE(" + Utilities.byte16HexString(id) + ")"; |
|
868 } |
|
869 |
|
870 static Collection<CipherSuite> allowedCipherSuites() { |
|
871 Collection<CipherSuite> cipherSuites = new LinkedList<>(); |
|
872 for (CipherSuite cs : CipherSuite.values()) { |
|
873 if (!cs.supportedProtocols.isEmpty()) { |
|
874 cipherSuites.add(cs); |
|
875 } else { |
|
876 // The following cipher suites are not supported. |
|
877 break; |
|
878 } |
|
879 } |
|
880 return cipherSuites; |
|
881 } |
|
882 |
|
883 static Collection<CipherSuite> defaultCipherSuites() { |
|
884 Collection<CipherSuite> cipherSuites = new LinkedList<>(); |
|
885 for (CipherSuite cs : CipherSuite.values()) { |
|
886 if (cs.isDefaultEnabled) { |
|
887 cipherSuites.add(cs); |
|
888 } else { |
|
889 // The following cipher suites are not default enabled.. |
|
890 break; |
|
891 } |
|
892 } |
|
893 return cipherSuites; |
|
894 } |
130 |
895 |
131 /** |
896 /** |
132 * Constructor for implemented CipherSuites. |
897 * Validates and converts an array of cipher suite names. |
|
898 * |
|
899 * @throws IllegalArgumentException if the array or any of its elements |
|
900 * is null or if the ciphersuite name is unrecognized or |
|
901 * unsupported using currently installed providers |
133 */ |
902 */ |
134 private CipherSuite(String name, int id, int priority, |
903 static List<CipherSuite> validValuesOf(String[] names) { |
135 KeyExchange keyExchange, BulkCipher cipher, MacAlg mac, |
904 if (names == null || names.length == 0) { |
136 boolean allowed, int obsoleted, int supported, PRF prfAlg) { |
905 return Collections.emptyList(); |
137 this.name = name; |
906 } |
138 this.id = id; |
907 |
139 this.priority = priority; |
908 List<CipherSuite> cipherSuites = new ArrayList<>(names.length); |
140 this.keyExchange = keyExchange; |
909 for (String name : names) { |
141 this.cipher = cipher; |
910 boolean found = false; |
142 this.macAlg = mac; |
911 for (CipherSuite cs : CipherSuite.values()) { |
143 this.exportable = cipher.exportable; |
912 if (!cs.supportedProtocols.isEmpty()) { |
144 allowed &= keyExchange.allowed; |
913 if (cs.name.equals(name) || |
145 allowed &= cipher.allowed; |
914 cs.aliases.contains(name)) { |
146 this.allowed = allowed; |
915 cipherSuites.add(cs); |
147 this.obsoleted = obsoleted; |
916 found = true; |
148 this.supported = supported; |
917 break; |
149 this.prfAlg = prfAlg; |
918 } |
150 } |
919 } else { |
151 |
920 // The following cipher suites are not supported. |
152 /** |
921 break; |
153 * Constructor for unimplemented CipherSuites. |
922 } |
154 */ |
923 } |
155 private CipherSuite(String name, int id) { |
924 if (!found) { |
156 this.name = name; |
925 throw new IllegalArgumentException( |
157 this.id = id; |
926 "Cannot support " + name + |
158 this.allowed = false; |
927 " with currently installed providers"); |
159 |
928 } |
160 this.priority = 0; |
929 } |
161 this.keyExchange = null; |
930 |
162 this.cipher = null; |
931 return Collections.unmodifiableList(cipherSuites); |
163 this.macAlg = null; |
932 } |
164 this.exportable = false; |
933 |
165 this.obsoleted = ProtocolVersion.LIMIT_MAX_VALUE; |
934 static String[] namesOf(List<CipherSuite> cipherSuites) { |
166 this.supported = ProtocolVersion.LIMIT_MIN_VALUE; |
935 String[] names = new String[cipherSuites.size()]; |
167 this.prfAlg = P_NONE; |
936 int i = 0; |
168 } |
937 for (CipherSuite cipherSuite : cipherSuites) { |
169 |
938 names[i++] = cipherSuite.name; |
170 /** |
939 } |
171 * Return whether this CipherSuite is available for use. A |
940 |
172 * CipherSuite may be unavailable even if it is supported |
941 return names; |
173 * (i.e. allowed == true) if the required JCE cipher is not installed. |
942 } |
174 */ |
943 |
175 boolean isAvailable() { |
944 boolean isAvailable() { |
176 return allowed && keyExchange.isAvailable() && cipher.isAvailable(); |
945 return !supportedProtocols.isEmpty() && |
|
946 (keyExchange == null || keyExchange.isAvailable()) && |
|
947 bulkCipher != null && bulkCipher.isAvailable(); |
|
948 } |
|
949 |
|
950 public boolean supports(ProtocolVersion protocolVersion) { |
|
951 return supportedProtocols.contains(protocolVersion); |
177 } |
952 } |
178 |
953 |
179 boolean isNegotiable() { |
954 boolean isNegotiable() { |
180 return this != C_SCSV && isAvailable(); |
955 return this != TLS_EMPTY_RENEGOTIATION_INFO_SCSV && isAvailable(); |
181 } |
956 } |
182 |
957 |
183 // See also CipherBox.calculatePacketSize(). |
958 boolean isAnonymous() { |
|
959 return (keyExchange != null && keyExchange.isAnonymous); |
|
960 } |
|
961 |
|
962 // See also SSLWriteCipher.calculatePacketSize(). |
184 int calculatePacketSize(int fragmentSize, |
963 int calculatePacketSize(int fragmentSize, |
185 ProtocolVersion protocolVersion, boolean isDTLS) { |
964 ProtocolVersion protocolVersion, boolean isDTLS) { |
186 |
|
187 int packetSize = fragmentSize; |
965 int packetSize = fragmentSize; |
188 if (cipher != B_NULL) { |
966 if (bulkCipher != null && bulkCipher != B_NULL) { |
189 int blockSize = cipher.ivSize; |
967 int blockSize = bulkCipher.ivSize; |
190 switch (cipher.cipherType) { |
968 switch (bulkCipher.cipherType) { |
191 case BLOCK_CIPHER: |
969 case BLOCK_CIPHER: |
192 packetSize += macAlg.size; |
970 packetSize += macAlg.size; |
193 packetSize += 1; // 1 byte padding length field |
971 packetSize += 1; // 1 byte padding length field |
194 packetSize += // use the minimal padding |
972 packetSize += // use the minimal padding |
195 (blockSize - (packetSize % blockSize)) % blockSize; |
973 (blockSize - (packetSize % blockSize)) % blockSize; |
651 this.size = size; |
1126 this.size = size; |
652 this.hashBlockSize = hashBlockSize; |
1127 this.hashBlockSize = hashBlockSize; |
653 this.minimalPaddingSize = minimalPaddingSize; |
1128 this.minimalPaddingSize = minimalPaddingSize; |
654 } |
1129 } |
655 |
1130 |
656 /** |
|
657 * Return an initialized MAC for this MacAlg. ProtocolVersion |
|
658 * must either be SSL30 (SSLv3 custom MAC) or TLS10 (std. HMAC). |
|
659 * |
|
660 * @exception NoSuchAlgorithmException if anything goes wrong |
|
661 */ |
|
662 MAC newMac(ProtocolVersion protocolVersion, SecretKey secret) |
|
663 throws NoSuchAlgorithmException, InvalidKeyException { |
|
664 return new MAC(this, protocolVersion, secret); |
|
665 } |
|
666 |
|
667 @Override |
1131 @Override |
668 public String toString() { |
1132 public String toString() { |
669 return name; |
1133 return name; |
670 } |
1134 } |
671 } |
1135 } |
672 |
1136 |
673 /** |
1137 /** |
674 * PRFs (PseudoRandom Function) from TLS specifications. |
1138 * The hash algorithms used for PRF (PseudoRandom Function) or HKDF. |
675 * |
1139 * |
676 * TLS 1.1- uses a single MD5/SHA1-based PRF algorithm for generating |
1140 * Note that TLS 1.1- uses a single MD5/SHA1-based PRF algorithm for |
677 * the necessary material. |
1141 * generating the necessary material. |
678 * |
|
679 * In TLS 1.2+, all existing/known CipherSuites use SHA256, however |
|
680 * new Ciphersuites (e.g. RFC 5288) can define specific PRF hash |
|
681 * algorithms. |
|
682 */ |
1142 */ |
683 static enum PRF { |
1143 static enum HashAlg { |
684 |
1144 |
685 // PRF algorithms |
1145 // PRF algorithms |
686 P_NONE( "NONE", 0, 0), |
1146 H_NONE( "NONE", 0, 0), |
687 P_SHA256("SHA-256", 32, 64), |
1147 H_SHA256("SHA-256", 32, 64), |
688 P_SHA384("SHA-384", 48, 128), |
1148 H_SHA384("SHA-384", 48, 128); |
689 P_SHA512("SHA-512", 64, 128); // not currently used. |
|
690 |
1149 |
691 // PRF characteristics |
1150 // PRF characteristics |
692 private final String prfHashAlg; |
1151 final String name; |
693 private final int prfHashLength; |
1152 final int hashLength; |
694 private final int prfBlockSize; |
1153 final int blockSize; |
695 |
1154 |
696 PRF(String prfHashAlg, int prfHashLength, int prfBlockSize) { |
1155 HashAlg(String hashAlg, int hashLength, int blockSize) { |
697 this.prfHashAlg = prfHashAlg; |
1156 this.name = hashAlg; |
698 this.prfHashLength = prfHashLength; |
1157 this.hashLength = hashLength; |
699 this.prfBlockSize = prfBlockSize; |
1158 this.blockSize = blockSize; |
700 } |
1159 } |
701 |
1160 |
702 String getPRFHashAlg() { |
1161 @Override |
703 return prfHashAlg; |
1162 public String toString() { |
704 } |
1163 return name; |
705 |
1164 } |
706 int getPRFHashLength() { |
1165 } |
707 return prfHashLength; |
|
708 } |
|
709 |
|
710 int getPRFBlockSize() { |
|
711 return prfBlockSize; |
|
712 } |
|
713 } |
|
714 |
|
715 static { |
|
716 idMap = new HashMap<Integer,CipherSuite>(); |
|
717 nameMap = new HashMap<String,CipherSuite>(); |
|
718 |
|
719 final boolean F = false; |
|
720 final boolean T = true; |
|
721 // N: ciphersuites only allowed if we are not in FIPS mode |
|
722 final boolean N = (SunJSSE.isFIPS() == false); |
|
723 |
|
724 /* |
|
725 * TLS Cipher Suite Registry, as of November 2015. |
|
726 * |
|
727 * http://www.iana.org/assignments/tls-parameters/tls-parameters.xml |
|
728 * |
|
729 * Range Registration Procedures Notes |
|
730 * 000-191 Standards Action Refers to value of first byte |
|
731 * 192-254 Specification Required Refers to value of first byte |
|
732 * 255 Reserved for Private Use Refers to value of first byte |
|
733 * |
|
734 * Value Description Reference |
|
735 * 0x00,0x00 TLS_NULL_WITH_NULL_NULL [RFC5246] |
|
736 * 0x00,0x01 TLS_RSA_WITH_NULL_MD5 [RFC5246] |
|
737 * 0x00,0x02 TLS_RSA_WITH_NULL_SHA [RFC5246] |
|
738 * 0x00,0x03 TLS_RSA_EXPORT_WITH_RC4_40_MD5 [RFC4346] |
|
739 * 0x00,0x04 TLS_RSA_WITH_RC4_128_MD5 [RFC5246] |
|
740 * 0x00,0x05 TLS_RSA_WITH_RC4_128_SHA [RFC5246] |
|
741 * 0x00,0x06 TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 [RFC4346] |
|
742 * 0x00,0x07 TLS_RSA_WITH_IDEA_CBC_SHA [RFC5469] |
|
743 * 0x00,0x08 TLS_RSA_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
744 * 0x00,0x09 TLS_RSA_WITH_DES_CBC_SHA [RFC5469] |
|
745 * 0x00,0x0A TLS_RSA_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
746 * 0x00,0x0B TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
747 * 0x00,0x0C TLS_DH_DSS_WITH_DES_CBC_SHA [RFC5469] |
|
748 * 0x00,0x0D TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
749 * 0x00,0x0E TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
750 * 0x00,0x0F TLS_DH_RSA_WITH_DES_CBC_SHA [RFC5469] |
|
751 * 0x00,0x10 TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
752 * 0x00,0x11 TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
753 * 0x00,0x12 TLS_DHE_DSS_WITH_DES_CBC_SHA [RFC5469] |
|
754 * 0x00,0x13 TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
755 * 0x00,0x14 TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
756 * 0x00,0x15 TLS_DHE_RSA_WITH_DES_CBC_SHA [RFC5469] |
|
757 * 0x00,0x16 TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
758 * 0x00,0x17 TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 [RFC4346] |
|
759 * 0x00,0x18 TLS_DH_anon_WITH_RC4_128_MD5 [RFC5246] |
|
760 * 0x00,0x19 TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA [RFC4346] |
|
761 * 0x00,0x1A TLS_DH_anon_WITH_DES_CBC_SHA [RFC5469] |
|
762 * 0x00,0x1B TLS_DH_anon_WITH_3DES_EDE_CBC_SHA [RFC5246] |
|
763 * 0x00,0x1C-1D Reserved to avoid conflicts with SSLv3 [RFC5246] |
|
764 * 0x00,0x1E TLS_KRB5_WITH_DES_CBC_SHA [RFC2712] |
|
765 * 0x00,0x1F TLS_KRB5_WITH_3DES_EDE_CBC_SHA [RFC2712] |
|
766 * 0x00,0x20 TLS_KRB5_WITH_RC4_128_SHA [RFC2712] |
|
767 * 0x00,0x21 TLS_KRB5_WITH_IDEA_CBC_SHA [RFC2712] |
|
768 * 0x00,0x22 TLS_KRB5_WITH_DES_CBC_MD5 [RFC2712] |
|
769 * 0x00,0x23 TLS_KRB5_WITH_3DES_EDE_CBC_MD5 [RFC2712] |
|
770 * 0x00,0x24 TLS_KRB5_WITH_RC4_128_MD5 [RFC2712] |
|
771 * 0x00,0x25 TLS_KRB5_WITH_IDEA_CBC_MD5 [RFC2712] |
|
772 * 0x00,0x26 TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA [RFC2712] |
|
773 * 0x00,0x27 TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA [RFC2712] |
|
774 * 0x00,0x28 TLS_KRB5_EXPORT_WITH_RC4_40_SHA [RFC2712] |
|
775 * 0x00,0x29 TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 [RFC2712] |
|
776 * 0x00,0x2A TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 [RFC2712] |
|
777 * 0x00,0x2B TLS_KRB5_EXPORT_WITH_RC4_40_MD5 [RFC2712] |
|
778 * 0x00,0x2C TLS_PSK_WITH_NULL_SHA [RFC4785] |
|
779 * 0x00,0x2D TLS_DHE_PSK_WITH_NULL_SHA [RFC4785] |
|
780 * 0x00,0x2E TLS_RSA_PSK_WITH_NULL_SHA [RFC4785] |
|
781 * 0x00,0x2F TLS_RSA_WITH_AES_128_CBC_SHA [RFC5246] |
|
782 * 0x00,0x30 TLS_DH_DSS_WITH_AES_128_CBC_SHA [RFC5246] |
|
783 * 0x00,0x31 TLS_DH_RSA_WITH_AES_128_CBC_SHA [RFC5246] |
|
784 * 0x00,0x32 TLS_DHE_DSS_WITH_AES_128_CBC_SHA [RFC5246] |
|
785 * 0x00,0x33 TLS_DHE_RSA_WITH_AES_128_CBC_SHA [RFC5246] |
|
786 * 0x00,0x34 TLS_DH_anon_WITH_AES_128_CBC_SHA [RFC5246] |
|
787 * 0x00,0x35 TLS_RSA_WITH_AES_256_CBC_SHA [RFC5246] |
|
788 * 0x00,0x36 TLS_DH_DSS_WITH_AES_256_CBC_SHA [RFC5246] |
|
789 * 0x00,0x37 TLS_DH_RSA_WITH_AES_256_CBC_SHA [RFC5246] |
|
790 * 0x00,0x38 TLS_DHE_DSS_WITH_AES_256_CBC_SHA [RFC5246] |
|
791 * 0x00,0x39 TLS_DHE_RSA_WITH_AES_256_CBC_SHA [RFC5246] |
|
792 * 0x00,0x3A TLS_DH_anon_WITH_AES_256_CBC_SHA [RFC5246] |
|
793 * 0x00,0x3B TLS_RSA_WITH_NULL_SHA256 [RFC5246] |
|
794 * 0x00,0x3C TLS_RSA_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
795 * 0x00,0x3D TLS_RSA_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
796 * 0x00,0x3E TLS_DH_DSS_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
797 * 0x00,0x3F TLS_DH_RSA_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
798 * 0x00,0x40 TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
799 * 0x00,0x41 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
800 * 0x00,0x42 TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
801 * 0x00,0x43 TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
802 * 0x00,0x44 TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
803 * 0x00,0x45 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
804 * 0x00,0x46 TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA [RFC5932] |
|
805 * 0x00,0x47-4F Reserved to avoid conflicts with |
|
806 * deployed implementations [Pasi_Eronen] |
|
807 * 0x00,0x50-58 Reserved to avoid conflicts [Pasi Eronen] |
|
808 * 0x00,0x59-5C Reserved to avoid conflicts with |
|
809 * deployed implementations [Pasi_Eronen] |
|
810 * 0x00,0x5D-5F Unassigned |
|
811 * 0x00,0x60-66 Reserved to avoid conflicts with widely |
|
812 * deployed implementations [Pasi_Eronen] |
|
813 * 0x00,0x67 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
814 * 0x00,0x68 TLS_DH_DSS_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
815 * 0x00,0x69 TLS_DH_RSA_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
816 * 0x00,0x6A TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
817 * 0x00,0x6B TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
818 * 0x00,0x6C TLS_DH_anon_WITH_AES_128_CBC_SHA256 [RFC5246] |
|
819 * 0x00,0x6D TLS_DH_anon_WITH_AES_256_CBC_SHA256 [RFC5246] |
|
820 * 0x00,0x6E-83 Unassigned |
|
821 * 0x00,0x84 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
822 * 0x00,0x85 TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
823 * 0x00,0x86 TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
824 * 0x00,0x87 TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
825 * 0x00,0x88 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
826 * 0x00,0x89 TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA [RFC5932] |
|
827 * 0x00,0x8A TLS_PSK_WITH_RC4_128_SHA [RFC4279] |
|
828 * 0x00,0x8B TLS_PSK_WITH_3DES_EDE_CBC_SHA [RFC4279] |
|
829 * 0x00,0x8C TLS_PSK_WITH_AES_128_CBC_SHA [RFC4279] |
|
830 * 0x00,0x8D TLS_PSK_WITH_AES_256_CBC_SHA [RFC4279] |
|
831 * 0x00,0x8E TLS_DHE_PSK_WITH_RC4_128_SHA [RFC4279] |
|
832 * 0x00,0x8F TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA [RFC4279] |
|
833 * 0x00,0x90 TLS_DHE_PSK_WITH_AES_128_CBC_SHA [RFC4279] |
|
834 * 0x00,0x91 TLS_DHE_PSK_WITH_AES_256_CBC_SHA [RFC4279] |
|
835 * 0x00,0x92 TLS_RSA_PSK_WITH_RC4_128_SHA [RFC4279] |
|
836 * 0x00,0x93 TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA [RFC4279] |
|
837 * 0x00,0x94 TLS_RSA_PSK_WITH_AES_128_CBC_SHA [RFC4279] |
|
838 * 0x00,0x95 TLS_RSA_PSK_WITH_AES_256_CBC_SHA [RFC4279] |
|
839 * 0x00,0x96 TLS_RSA_WITH_SEED_CBC_SHA [RFC4162] |
|
840 * 0x00,0x97 TLS_DH_DSS_WITH_SEED_CBC_SHA [RFC4162] |
|
841 * 0x00,0x98 TLS_DH_RSA_WITH_SEED_CBC_SHA [RFC4162] |
|
842 * 0x00,0x99 TLS_DHE_DSS_WITH_SEED_CBC_SHA [RFC4162] |
|
843 * 0x00,0x9A TLS_DHE_RSA_WITH_SEED_CBC_SHA [RFC4162] |
|
844 * 0x00,0x9B TLS_DH_anon_WITH_SEED_CBC_SHA [RFC4162] |
|
845 * 0x00,0x9C TLS_RSA_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
846 * 0x00,0x9D TLS_RSA_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
847 * 0x00,0x9E TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
848 * 0x00,0x9F TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
849 * 0x00,0xA0 TLS_DH_RSA_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
850 * 0x00,0xA1 TLS_DH_RSA_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
851 * 0x00,0xA2 TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
852 * 0x00,0xA3 TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
853 * 0x00,0xA4 TLS_DH_DSS_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
854 * 0x00,0xA5 TLS_DH_DSS_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
855 * 0x00,0xA6 TLS_DH_anon_WITH_AES_128_GCM_SHA256 [RFC5288] |
|
856 * 0x00,0xA7 TLS_DH_anon_WITH_AES_256_GCM_SHA384 [RFC5288] |
|
857 * 0x00,0xA8 TLS_PSK_WITH_AES_128_GCM_SHA256 [RFC5487] |
|
858 * 0x00,0xA9 TLS_PSK_WITH_AES_256_GCM_SHA384 [RFC5487] |
|
859 * 0x00,0xAA TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 [RFC5487] |
|
860 * 0x00,0xAB TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 [RFC5487] |
|
861 * 0x00,0xAC TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 [RFC5487] |
|
862 * 0x00,0xAD TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 [RFC5487] |
|
863 * 0x00,0xAE TLS_PSK_WITH_AES_128_CBC_SHA256 [RFC5487] |
|
864 * 0x00,0xAF TLS_PSK_WITH_AES_256_CBC_SHA384 [RFC5487] |
|
865 * 0x00,0xB0 TLS_PSK_WITH_NULL_SHA256 [RFC5487] |
|
866 * 0x00,0xB1 TLS_PSK_WITH_NULL_SHA384 [RFC5487] |
|
867 * 0x00,0xB2 TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 [RFC5487] |
|
868 * 0x00,0xB3 TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 [RFC5487] |
|
869 * 0x00,0xB4 TLS_DHE_PSK_WITH_NULL_SHA256 [RFC5487] |
|
870 * 0x00,0xB5 TLS_DHE_PSK_WITH_NULL_SHA384 [RFC5487] |
|
871 * 0x00,0xB6 TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 [RFC5487] |
|
872 * 0x00,0xB7 TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 [RFC5487] |
|
873 * 0x00,0xB8 TLS_RSA_PSK_WITH_NULL_SHA256 [RFC5487] |
|
874 * 0x00,0xB9 TLS_RSA_PSK_WITH_NULL_SHA384 [RFC5487] |
|
875 * 0x00,0xBA TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
876 * 0x00,0xBB TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
877 * 0x00,0xBC TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
878 * 0x00,0xBD TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
879 * 0x00,0xBE TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
880 * 0x00,0xBF TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 [RFC5932] |
|
881 * 0x00,0xC0 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
882 * 0x00,0xC1 TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
883 * 0x00,0xC2 TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
884 * 0x00,0xC3 TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
885 * 0x00,0xC4 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
886 * 0x00,0xC5 TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 [RFC5932] |
|
887 * 0x00,0xC6-FE Unassigned |
|
888 * 0x00,0xFF TLS_EMPTY_RENEGOTIATION_INFO_SCSV [RFC5746] |
|
889 * 0x01-55,* Unassigned |
|
890 * 0x56,0x00 TLS_FALLBACK_SCSV [RFC7507] |
|
891 * 0x56,0x01-0xC0,0x00 Unassigned |
|
892 * 0xC0,0x01 TLS_ECDH_ECDSA_WITH_NULL_SHA [RFC4492] |
|
893 * 0xC0,0x02 TLS_ECDH_ECDSA_WITH_RC4_128_SHA [RFC4492] |
|
894 * 0xC0,0x03 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA [RFC4492] |
|
895 * 0xC0,0x04 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA [RFC4492] |
|
896 * 0xC0,0x05 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA [RFC4492] |
|
897 * 0xC0,0x06 TLS_ECDHE_ECDSA_WITH_NULL_SHA [RFC4492] |
|
898 * 0xC0,0x07 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA [RFC4492] |
|
899 * 0xC0,0x08 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA [RFC4492] |
|
900 * 0xC0,0x09 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA [RFC4492] |
|
901 * 0xC0,0x0A TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA [RFC4492] |
|
902 * 0xC0,0x0B TLS_ECDH_RSA_WITH_NULL_SHA [RFC4492] |
|
903 * 0xC0,0x0C TLS_ECDH_RSA_WITH_RC4_128_SHA [RFC4492] |
|
904 * 0xC0,0x0D TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA [RFC4492] |
|
905 * 0xC0,0x0E TLS_ECDH_RSA_WITH_AES_128_CBC_SHA [RFC4492] |
|
906 * 0xC0,0x0F TLS_ECDH_RSA_WITH_AES_256_CBC_SHA [RFC4492] |
|
907 * 0xC0,0x10 TLS_ECDHE_RSA_WITH_NULL_SHA [RFC4492] |
|
908 * 0xC0,0x11 TLS_ECDHE_RSA_WITH_RC4_128_SHA [RFC4492] |
|
909 * 0xC0,0x12 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA [RFC4492] |
|
910 * 0xC0,0x13 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA [RFC4492] |
|
911 * 0xC0,0x14 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA [RFC4492] |
|
912 * 0xC0,0x15 TLS_ECDH_anon_WITH_NULL_SHA [RFC4492] |
|
913 * 0xC0,0x16 TLS_ECDH_anon_WITH_RC4_128_SHA [RFC4492] |
|
914 * 0xC0,0x17 TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA [RFC4492] |
|
915 * 0xC0,0x18 TLS_ECDH_anon_WITH_AES_128_CBC_SHA [RFC4492] |
|
916 * 0xC0,0x19 TLS_ECDH_anon_WITH_AES_256_CBC_SHA [RFC4492] |
|
917 * 0xC0,0x1A TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA [RFC5054] |
|
918 * 0xC0,0x1B TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA [RFC5054] |
|
919 * 0xC0,0x1C TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA [RFC5054] |
|
920 * 0xC0,0x1D TLS_SRP_SHA_WITH_AES_128_CBC_SHA [RFC5054] |
|
921 * 0xC0,0x1E TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA [RFC5054] |
|
922 * 0xC0,0x1F TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA [RFC5054] |
|
923 * 0xC0,0x20 TLS_SRP_SHA_WITH_AES_256_CBC_SHA [RFC5054] |
|
924 * 0xC0,0x21 TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA [RFC5054] |
|
925 * 0xC0,0x22 TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA [RFC5054] |
|
926 * 0xC0,0x23 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 [RFC5289] |
|
927 * 0xC0,0x24 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 [RFC5289] |
|
928 * 0xC0,0x25 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 [RFC5289] |
|
929 * 0xC0,0x26 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 [RFC5289] |
|
930 * 0xC0,0x27 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 [RFC5289] |
|
931 * 0xC0,0x28 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 [RFC5289] |
|
932 * 0xC0,0x29 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 [RFC5289] |
|
933 * 0xC0,0x2A TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 [RFC5289] |
|
934 * 0xC0,0x2B TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 [RFC5289] |
|
935 * 0xC0,0x2C TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 [RFC5289] |
|
936 * 0xC0,0x2D TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 [RFC5289] |
|
937 * 0xC0,0x2E TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 [RFC5289] |
|
938 * 0xC0,0x2F TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 [RFC5289] |
|
939 * 0xC0,0x30 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 [RFC5289] |
|
940 * 0xC0,0x31 TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 [RFC5289] |
|
941 * 0xC0,0x32 TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 [RFC5289] |
|
942 * 0xC0,0x33 TLS_ECDHE_PSK_WITH_RC4_128_SHA [RFC5489] |
|
943 * 0xC0,0x34 TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA [RFC5489] |
|
944 * 0xC0,0x35 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA [RFC5489] |
|
945 * 0xC0,0x36 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA [RFC5489] |
|
946 * 0xC0,0x37 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 [RFC5489] |
|
947 * 0xC0,0x38 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 [RFC5489] |
|
948 * 0xC0,0x39 TLS_ECDHE_PSK_WITH_NULL_SHA [RFC5489] |
|
949 * 0xC0,0x3A TLS_ECDHE_PSK_WITH_NULL_SHA256 [RFC5489] |
|
950 * 0xC0,0x3B TLS_ECDHE_PSK_WITH_NULL_SHA384 [RFC5489] |
|
951 * 0xC0,0x3C TLS_RSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
952 * 0xC0,0x3D TLS_RSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
953 * 0xC0,0x3E TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
954 * 0xC0,0x3F TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
955 * 0xC0,0x40 TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
956 * 0xC0,0x41 TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
957 * 0xC0,0x42 TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
958 * 0xC0,0x43 TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
959 * 0xC0,0x44 TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
960 * 0xC0,0x45 TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
961 * 0xC0,0x46 TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
962 * 0xC0,0x47 TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
963 * 0xC0,0x48 TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
964 * 0xC0,0x49 TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
965 * 0xC0,0x4A TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
966 * 0xC0,0x4B TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
967 * 0xC0,0x4C TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
968 * 0xC0,0x4D TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
969 * 0xC0,0x4E TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
970 * 0xC0,0x4F TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
971 * 0xC0,0x50 TLS_RSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
972 * 0xC0,0x51 TLS_RSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
973 * 0xC0,0x52 TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
974 * 0xC0,0x53 TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
975 * 0xC0,0x54 TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
976 * 0xC0,0x55 TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
977 * 0xC0,0x56 TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
978 * 0xC0,0x57 TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
979 * 0xC0,0x58 TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
980 * 0xC0,0x59 TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
981 * 0xC0,0x5A TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
982 * 0xC0,0x5B TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
983 * 0xC0,0x5C TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
984 * 0xC0,0x5D TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
985 * 0xC0,0x5E TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
986 * 0xC0,0x5F TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
987 * 0xC0,0x60 TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
988 * 0xC0,0x61 TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
989 * 0xC0,0x62 TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
990 * 0xC0,0x63 TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
991 * 0xC0,0x64 TLS_PSK_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
992 * 0xC0,0x65 TLS_PSK_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
993 * 0xC0,0x66 TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
994 * 0xC0,0x67 TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
995 * 0xC0,0x68 TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
996 * 0xC0,0x69 TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
997 * 0xC0,0x6A TLS_PSK_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
998 * 0xC0,0x6B TLS_PSK_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
999 * 0xC0,0x6C TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
1000 * 0xC0,0x6D TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
1001 * 0xC0,0x6E TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 [RFC6209] |
|
1002 * 0xC0,0x6F TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 [RFC6209] |
|
1003 * 0xC0,0x70 TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 [RFC6209] |
|
1004 * 0xC0,0x71 TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 [RFC6209] |
|
1005 * 0xC0,0x72 TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1006 * 0xC0,0x73 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1007 * 0xC0,0x74 TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1008 * 0xC0,0x75 TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1009 * 0xC0,0x76 TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1010 * 0xC0,0x77 TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1011 * 0xC0,0x78 TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1012 * 0xC0,0x79 TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1013 * 0xC0,0x7A TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1014 * 0xC0,0x7B TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1015 * 0xC0,0x7C TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1016 * 0xC0,0x7D TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1017 * 0xC0,0x7E TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1018 * 0xC0,0x7F TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1019 * 0xC0,0x80 TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1020 * 0xC0,0x81 TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1021 * 0xC0,0x82 TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1022 * 0xC0,0x83 TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1023 * 0xC0,0x84 TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1024 * 0xC0,0x85 TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1025 * 0xC0,0x86 TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1026 * 0xC0,0x87 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1027 * 0xC0,0x88 TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1028 * 0xC0,0x89 TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1029 * 0xC0,0x8A TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1030 * 0xC0,0x8B TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1031 * 0xC0,0x8C TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1032 * 0xC0,0x8D TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1033 * 0xC0,0x8E TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1034 * 0xC0,0x8F TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1035 * 0xC0,0x90 TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1036 * 0xC0,0x91 TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1037 * 0xC0,0x92 TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 [RFC6367] |
|
1038 * 0xC0,0x93 TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 [RFC6367] |
|
1039 * 0xC0,0x94 TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1040 * 0xC0,0x95 TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1041 * 0xC0,0x96 TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1042 * 0xC0,0x97 TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1043 * 0xC0,0x98 TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1044 * 0xC0,0x99 TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1045 * 0xC0,0x9A TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 [RFC6367] |
|
1046 * 0xC0,0x9B TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 [RFC6367] |
|
1047 * 0xC0,0x9C TLS_RSA_WITH_AES_128_CCM [RFC6655] |
|
1048 * 0xC0,0x9D TLS_RSA_WITH_AES_256_CCM [RFC6655] |
|
1049 * 0xC0,0x9E TLS_DHE_RSA_WITH_AES_128_CCM [RFC6655] |
|
1050 * 0xC0,0x9F TLS_DHE_RSA_WITH_AES_256_CCM [RFC6655] |
|
1051 * 0xC0,0xA0 TLS_RSA_WITH_AES_128_CCM_8 [RFC6655] |
|
1052 * 0xC0,0xA1 TLS_RSA_WITH_AES_256_CCM_8 [RFC6655] |
|
1053 * 0xC0,0xA2 TLS_DHE_RSA_WITH_AES_128_CCM_8 [RFC6655] |
|
1054 * 0xC0,0xA3 TLS_DHE_RSA_WITH_AES_256_CCM_8 [RFC6655] |
|
1055 * 0xC0,0xA4 TLS_PSK_WITH_AES_128_CCM [RFC6655] |
|
1056 * 0xC0,0xA5 TLS_PSK_WITH_AES_256_CCM [RFC6655] |
|
1057 * 0xC0,0xA6 TLS_DHE_PSK_WITH_AES_128_CCM [RFC6655] |
|
1058 * 0xC0,0xA7 TLS_DHE_PSK_WITH_AES_256_CCM [RFC6655] |
|
1059 * 0xC0,0xA8 TLS_PSK_WITH_AES_128_CCM_8 [RFC6655] |
|
1060 * 0xC0,0xA9 TLS_PSK_WITH_AES_256_CCM_8 [RFC6655] |
|
1061 * 0xC0,0xAA TLS_PSK_DHE_WITH_AES_128_CCM_8 [RFC6655] |
|
1062 * 0xC0,0xAB TLS_PSK_DHE_WITH_AES_256_CCM_8 [RFC6655] |
|
1063 * 0xC0,0xAC TLS_ECDHE_ECDSA_WITH_AES_128_CCM [RFC7251] |
|
1064 * 0xC0,0xAD TLS_ECDHE_ECDSA_WITH_AES_256_CCM [RFC7251] |
|
1065 * 0xC0,0xAE TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 [RFC7251] |
|
1066 * 0xC0,0xAF TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 [RFC7251] |
|
1067 * 0xC0,0xB0-FF Unassigned |
|
1068 * 0xC1-FD,* Unassigned |
|
1069 * 0xFE,0x00-FD Unassigned |
|
1070 * 0xFE,0xFE-FF Reserved to avoid conflicts with widely |
|
1071 * deployed implementations [Pasi_Eronen] |
|
1072 * 0xFF,0x00-FF Reserved for Private Use [RFC5246] |
|
1073 */ |
|
1074 |
|
1075 add("SSL_NULL_WITH_NULL_NULL", 0x0000, |
|
1076 1, K_NULL, B_NULL, M_NULL, F); |
|
1077 |
|
1078 /* |
|
1079 * Definition of the CipherSuites that are enabled by default. |
|
1080 * They are listed in preference order, most preferred first, using |
|
1081 * the following criteria: |
|
1082 * 1. Prefer Suite B compliant cipher suites, see RFC6460 (To be |
|
1083 * changed later, see below). |
|
1084 * 2. Prefer the stronger bulk cipher, in the order of AES_256(GCM), |
|
1085 * AES_128(GCM), AES_256, AES_128, 3DES-EDE. |
|
1086 * 3. Prefer the stronger MAC algorithm, in the order of SHA384, |
|
1087 * SHA256, SHA, MD5. |
|
1088 * 4. Prefer the better performance of key exchange and digital |
|
1089 * signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA, |
|
1090 * RSA, ECDH-ECDSA, ECDH-RSA, DHE-RSA, DHE-DSS. |
|
1091 */ |
|
1092 int p = DEFAULT_SUITES_PRIORITY * 2; |
|
1093 |
|
1094 // shorten names to fit the following table cleanly. |
|
1095 int max = ProtocolVersion.LIMIT_MAX_VALUE; |
|
1096 int tls11 = ProtocolVersion.TLS11.v; |
|
1097 int tls12 = ProtocolVersion.TLS12.v; |
|
1098 |
|
1099 // ID Key Exchange Cipher A obs suprt PRF |
|
1100 // ====== ============ ========= = === ===== ======== |
|
1101 |
|
1102 // Suite B compliant cipher suites, see RFC 6460. |
|
1103 // |
|
1104 // Note that, at present this provider is not Suite B compliant. The |
|
1105 // preference order of the GCM cipher suites does not follow the spec |
|
1106 // of RFC 6460. In this section, only two cipher suites are listed |
|
1107 // so that applications can make use of Suite-B compliant cipher |
|
1108 // suite firstly. |
|
1109 add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02c, --p, |
|
1110 K_ECDHE_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1111 add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02b, --p, |
|
1112 K_ECDHE_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1113 |
|
1114 // AES_256(GCM) |
|
1115 add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", 0xc030, --p, |
|
1116 K_ECDHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1117 add("TLS_RSA_WITH_AES_256_GCM_SHA384", 0x009d, --p, |
|
1118 K_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1119 add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02e, --p, |
|
1120 K_ECDH_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1121 add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", 0xc032, --p, |
|
1122 K_ECDH_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1123 add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", 0x009f, --p, |
|
1124 K_DHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1125 add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", 0x00a3, --p, |
|
1126 K_DHE_DSS, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); |
|
1127 |
|
1128 // AES_128(GCM) |
|
1129 add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", 0xc02f, --p, |
|
1130 K_ECDHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1131 add("TLS_RSA_WITH_AES_128_GCM_SHA256", 0x009c, --p, |
|
1132 K_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1133 add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02d, --p, |
|
1134 K_ECDH_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1135 add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", 0xc031, --p, |
|
1136 K_ECDH_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1137 add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", 0x009e, --p, |
|
1138 K_DHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1139 add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", 0x00a2, --p, |
|
1140 K_DHE_DSS, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); |
|
1141 |
|
1142 // AES_256(CBC) |
|
1143 add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0xc024, --p, |
|
1144 K_ECDHE_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); |
|
1145 add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0xc028, --p, |
|
1146 K_ECDHE_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); |
|
1147 add("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x003d, --p, |
|
1148 K_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); |
|
1149 add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0xc026, --p, |
|
1150 K_ECDH_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); |
|
1151 add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0xc02a, --p, |
|
1152 K_ECDH_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); |
|
1153 add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x006b, --p, |
|
1154 K_DHE_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); |
|
1155 add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x006a, --p, |
|
1156 K_DHE_DSS, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); |
|
1157 |
|
1158 add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", 0xC00A, --p, |
|
1159 K_ECDHE_ECDSA, B_AES_256, M_SHA, T); |
|
1160 add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", 0xC014, --p, |
|
1161 K_ECDHE_RSA, B_AES_256, M_SHA, T); |
|
1162 add("TLS_RSA_WITH_AES_256_CBC_SHA", 0x0035, --p, |
|
1163 K_RSA, B_AES_256, M_SHA, T); |
|
1164 add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", 0xC005, --p, |
|
1165 K_ECDH_ECDSA, B_AES_256, M_SHA, T); |
|
1166 add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", 0xC00F, --p, |
|
1167 K_ECDH_RSA, B_AES_256, M_SHA, T); |
|
1168 add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA", 0x0039, --p, |
|
1169 K_DHE_RSA, B_AES_256, M_SHA, T); |
|
1170 add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA", 0x0038, --p, |
|
1171 K_DHE_DSS, B_AES_256, M_SHA, T); |
|
1172 |
|
1173 // AES_128(CBC) |
|
1174 add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0xc023, --p, |
|
1175 K_ECDHE_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1176 add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0xc027, --p, |
|
1177 K_ECDHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1178 add("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x003c, --p, |
|
1179 K_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1180 add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0xc025, --p, |
|
1181 K_ECDH_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1182 add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0xc029, --p, |
|
1183 K_ECDH_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1184 add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0067, --p, |
|
1185 K_DHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1186 add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0040, --p, |
|
1187 K_DHE_DSS, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); |
|
1188 |
|
1189 add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", 0xC009, --p, |
|
1190 K_ECDHE_ECDSA, B_AES_128, M_SHA, T); |
|
1191 add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 0xC013, --p, |
|
1192 K_ECDHE_RSA, B_AES_128, M_SHA, T); |
|
1193 add("TLS_RSA_WITH_AES_128_CBC_SHA", 0x002f, --p, |
|
1194 K_RSA, B_AES_128, M_SHA, T); |
|
1195 add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", 0xC004, --p, |
|
1196 K_ECDH_ECDSA, B_AES_128, M_SHA, T); |
|
1197 add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", 0xC00E, --p, |
|
1198 K_ECDH_RSA, B_AES_128, M_SHA, T); |
|
1199 add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 0x0033, --p, |
|
1200 K_DHE_RSA, B_AES_128, M_SHA, T); |
|
1201 add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA", 0x0032, --p, |
|
1202 K_DHE_DSS, B_AES_128, M_SHA, T); |
|
1203 |
|
1204 // 3DES_EDE |
|
1205 add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC008, --p, |
|
1206 K_ECDHE_ECDSA, B_3DES, M_SHA, T); |
|
1207 add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", 0xC012, --p, |
|
1208 K_ECDHE_RSA, B_3DES, M_SHA, T); |
|
1209 add("SSL_RSA_WITH_3DES_EDE_CBC_SHA", 0x000a, --p, |
|
1210 K_RSA, B_3DES, M_SHA, T); |
|
1211 add("TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC003, --p, |
|
1212 K_ECDH_ECDSA, B_3DES, M_SHA, T); |
|
1213 add("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", 0xC00D, --p, |
|
1214 K_ECDH_RSA, B_3DES, M_SHA, T); |
|
1215 add("SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", 0x0016, --p, |
|
1216 K_DHE_RSA, B_3DES, M_SHA, T); |
|
1217 add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", 0x0013, --p, |
|
1218 K_DHE_DSS, B_3DES, M_SHA, N); |
|
1219 |
|
1220 // Renegotiation protection request Signalling Cipher Suite Value (SCSV) |
|
1221 add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0x00ff, --p, |
|
1222 K_SCSV, B_NULL, M_NULL, T); |
|
1223 |
|
1224 /* |
|
1225 * Definition of the CipherSuites that are supported but not enabled |
|
1226 * by default. |
|
1227 * They are listed in preference order, preferred first, using the |
|
1228 * following criteria: |
|
1229 * 1. CipherSuites for KRB5 need additional KRB5 service |
|
1230 * configuration, and these suites are not common in practice, |
|
1231 * so we put KRB5 based cipher suites at the end of the supported |
|
1232 * list. |
|
1233 * 2. If a cipher suite has been obsoleted, we put it at the end of |
|
1234 * the list. |
|
1235 * 3. Prefer the stronger bulk cipher, in the order of AES_256, |
|
1236 * AES_128, 3DES-EDE, RC-4, DES, DES40, RC4_40, NULL. |
|
1237 * 4. Prefer the stronger MAC algorithm, in the order of SHA384, |
|
1238 * SHA256, SHA, MD5. |
|
1239 * 5. Prefer the better performance of key exchange and digital |
|
1240 * signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA, |
|
1241 * RSA, ECDH-ECDSA, ECDH-RSA, DHE-RSA, DHE-DSS, anonymous. |
|
1242 */ |
|
1243 p = DEFAULT_SUITES_PRIORITY; |
|
1244 |
|
1245 add("TLS_DH_anon_WITH_AES_256_GCM_SHA384", 0x00a7, --p, |
|
1246 K_DH_ANON, B_AES_256_GCM, M_NULL, N, max, tls12, P_SHA384); |
|
1247 add("TLS_DH_anon_WITH_AES_128_GCM_SHA256", 0x00a6, --p, |
|
1248 K_DH_ANON, B_AES_128_GCM, M_NULL, N, max, tls12, P_SHA256); |
|
1249 |
|
1250 add("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x006d, --p, |
|
1251 K_DH_ANON, B_AES_256, M_SHA256, N, max, tls12, P_SHA256); |
|
1252 add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA", 0xC019, --p, |
|
1253 K_ECDH_ANON, B_AES_256, M_SHA, N); |
|
1254 add("TLS_DH_anon_WITH_AES_256_CBC_SHA", 0x003a, --p, |
|
1255 K_DH_ANON, B_AES_256, M_SHA, N); |
|
1256 |
|
1257 add("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x006c, --p, |
|
1258 K_DH_ANON, B_AES_128, M_SHA256, N, max, tls12, P_SHA256); |
|
1259 add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA", 0xC018, --p, |
|
1260 K_ECDH_ANON, B_AES_128, M_SHA, N); |
|
1261 add("TLS_DH_anon_WITH_AES_128_CBC_SHA", 0x0034, --p, |
|
1262 K_DH_ANON, B_AES_128, M_SHA, N); |
|
1263 |
|
1264 add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", 0xC017, --p, |
|
1265 K_ECDH_ANON, B_3DES, M_SHA, N); |
|
1266 add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", 0x001b, --p, |
|
1267 K_DH_ANON, B_3DES, M_SHA, N); |
|
1268 |
|
1269 // RC-4 |
|
1270 add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", 0xC007, --p, |
|
1271 K_ECDHE_ECDSA, B_RC4_128, M_SHA, N); |
|
1272 add("TLS_ECDHE_RSA_WITH_RC4_128_SHA", 0xC011, --p, |
|
1273 K_ECDHE_RSA, B_RC4_128, M_SHA, N); |
|
1274 add("SSL_RSA_WITH_RC4_128_SHA", 0x0005, --p, |
|
1275 K_RSA, B_RC4_128, M_SHA, N); |
|
1276 add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 0xC002, --p, |
|
1277 K_ECDH_ECDSA, B_RC4_128, M_SHA, N); |
|
1278 add("TLS_ECDH_RSA_WITH_RC4_128_SHA", 0xC00C, --p, |
|
1279 K_ECDH_RSA, B_RC4_128, M_SHA, N); |
|
1280 add("SSL_RSA_WITH_RC4_128_MD5", 0x0004, --p, |
|
1281 K_RSA, B_RC4_128, M_MD5, N); |
|
1282 |
|
1283 add("TLS_ECDH_anon_WITH_RC4_128_SHA", 0xC016, --p, |
|
1284 K_ECDH_ANON, B_RC4_128, M_SHA, N); |
|
1285 add("SSL_DH_anon_WITH_RC4_128_MD5", 0x0018, --p, |
|
1286 K_DH_ANON, B_RC4_128, M_MD5, N); |
|
1287 |
|
1288 // weak cipher suites obsoleted in TLS 1.2 |
|
1289 add("SSL_RSA_WITH_DES_CBC_SHA", 0x0009, --p, |
|
1290 K_RSA, B_DES, M_SHA, N, tls12); |
|
1291 add("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0015, --p, |
|
1292 K_DHE_RSA, B_DES, M_SHA, N, tls12); |
|
1293 add("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0012, --p, |
|
1294 K_DHE_DSS, B_DES, M_SHA, N, tls12); |
|
1295 add("SSL_DH_anon_WITH_DES_CBC_SHA", 0x001a, --p, |
|
1296 K_DH_ANON, B_DES, M_SHA, N, tls12); |
|
1297 |
|
1298 // weak cipher suites obsoleted in TLS 1.1 |
|
1299 add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0008, --p, |
|
1300 K_RSA_EXPORT, B_DES_40, M_SHA, N, tls11); |
|
1301 add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0014, --p, |
|
1302 K_DHE_RSA, B_DES_40, M_SHA, N, tls11); |
|
1303 add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0011, --p, |
|
1304 K_DHE_DSS, B_DES_40, M_SHA, N, tls11); |
|
1305 add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0019, --p, |
|
1306 K_DH_ANON, B_DES_40, M_SHA, N, tls11); |
|
1307 |
|
1308 add("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0003, --p, |
|
1309 K_RSA_EXPORT, B_RC4_40, M_MD5, N, tls11); |
|
1310 add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0017, --p, |
|
1311 K_DH_ANON, B_RC4_40, M_MD5, N, tls11); |
|
1312 |
|
1313 add("TLS_RSA_WITH_NULL_SHA256", 0x003b, --p, |
|
1314 K_RSA, B_NULL, M_SHA256, N, max, tls12, P_SHA256); |
|
1315 add("TLS_ECDHE_ECDSA_WITH_NULL_SHA", 0xC006, --p, |
|
1316 K_ECDHE_ECDSA, B_NULL, M_SHA, N); |
|
1317 add("TLS_ECDHE_RSA_WITH_NULL_SHA", 0xC010, --p, |
|
1318 K_ECDHE_RSA, B_NULL, M_SHA, N); |
|
1319 add("SSL_RSA_WITH_NULL_SHA", 0x0002, --p, |
|
1320 K_RSA, B_NULL, M_SHA, N); |
|
1321 add("TLS_ECDH_ECDSA_WITH_NULL_SHA", 0xC001, --p, |
|
1322 K_ECDH_ECDSA, B_NULL, M_SHA, N); |
|
1323 add("TLS_ECDH_RSA_WITH_NULL_SHA", 0xC00B, --p, |
|
1324 K_ECDH_RSA, B_NULL, M_SHA, N); |
|
1325 add("TLS_ECDH_anon_WITH_NULL_SHA", 0xC015, --p, |
|
1326 K_ECDH_ANON, B_NULL, M_SHA, N); |
|
1327 add("SSL_RSA_WITH_NULL_MD5", 0x0001, --p, |
|
1328 K_RSA, B_NULL, M_MD5, N); |
|
1329 |
|
1330 // Supported Kerberos ciphersuites from RFC2712 |
|
1331 add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA", 0x001f, --p, |
|
1332 K_KRB5, B_3DES, M_SHA, N); |
|
1333 add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5", 0x0023, --p, |
|
1334 K_KRB5, B_3DES, M_MD5, N); |
|
1335 add("TLS_KRB5_WITH_RC4_128_SHA", 0x0020, --p, |
|
1336 K_KRB5, B_RC4_128, M_SHA, N); |
|
1337 add("TLS_KRB5_WITH_RC4_128_MD5", 0x0024, --p, |
|
1338 K_KRB5, B_RC4_128, M_MD5, N); |
|
1339 add("TLS_KRB5_WITH_DES_CBC_SHA", 0x001e, --p, |
|
1340 K_KRB5, B_DES, M_SHA, N, tls12); |
|
1341 add("TLS_KRB5_WITH_DES_CBC_MD5", 0x0022, --p, |
|
1342 K_KRB5, B_DES, M_MD5, N, tls12); |
|
1343 add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0026, --p, |
|
1344 K_KRB5_EXPORT, B_DES_40, M_SHA, N, tls11); |
|
1345 add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0029, --p, |
|
1346 K_KRB5_EXPORT, B_DES_40, M_MD5, N, tls11); |
|
1347 add("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0028, --p, |
|
1348 K_KRB5_EXPORT, B_RC4_40, M_SHA, N, tls11); |
|
1349 add("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x002b, --p, |
|
1350 K_KRB5_EXPORT, B_RC4_40, M_MD5, N, tls11); |
|
1351 |
|
1352 /* |
|
1353 * Other values from the TLS Cipher Suite Registry, as of August 2010. |
|
1354 * |
|
1355 * http://www.iana.org/assignments/tls-parameters/tls-parameters.xml |
|
1356 * |
|
1357 * Range Registration Procedures Notes |
|
1358 * 000-191 Standards Action Refers to value of first byte |
|
1359 * 192-254 Specification Required Refers to value of first byte |
|
1360 * 255 Reserved for Private Use Refers to value of first byte |
|
1361 */ |
|
1362 |
|
1363 // Register the names of a few additional CipherSuites. |
|
1364 // Makes them show up as names instead of numbers in |
|
1365 // the debug output. |
|
1366 |
|
1367 // remaining unsupported ciphersuites defined in RFC2246. |
|
1368 add("SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5", 0x0006); |
|
1369 add("SSL_RSA_WITH_IDEA_CBC_SHA", 0x0007); |
|
1370 add("SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x000b); |
|
1371 add("SSL_DH_DSS_WITH_DES_CBC_SHA", 0x000c); |
|
1372 add("SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA", 0x000d); |
|
1373 add("SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x000e); |
|
1374 add("SSL_DH_RSA_WITH_DES_CBC_SHA", 0x000f); |
|
1375 add("SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA", 0x0010); |
|
1376 |
|
1377 // SSL 3.0 Fortezza ciphersuites |
|
1378 add("SSL_FORTEZZA_DMS_WITH_NULL_SHA", 0x001c); |
|
1379 add("SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA", 0x001d); |
|
1380 |
|
1381 // 1024/56 bit exportable ciphersuites from expired internet draft |
|
1382 add("SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA", 0x0062); |
|
1383 add("SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA", 0x0063); |
|
1384 add("SSL_RSA_EXPORT1024_WITH_RC4_56_SHA", 0x0064); |
|
1385 add("SSL_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA", 0x0065); |
|
1386 add("SSL_DHE_DSS_WITH_RC4_128_SHA", 0x0066); |
|
1387 |
|
1388 // Netscape old and new SSL 3.0 FIPS ciphersuites |
|
1389 // see http://www.mozilla.org/projects/security/pki/nss/ssl/fips-ssl-ciphersuites.html |
|
1390 add("NETSCAPE_RSA_FIPS_WITH_3DES_EDE_CBC_SHA", 0xffe0); |
|
1391 add("NETSCAPE_RSA_FIPS_WITH_DES_CBC_SHA", 0xffe1); |
|
1392 add("SSL_RSA_FIPS_WITH_DES_CBC_SHA", 0xfefe); |
|
1393 add("SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA", 0xfeff); |
|
1394 |
|
1395 // Unsupported Kerberos cipher suites from RFC 2712 |
|
1396 add("TLS_KRB5_WITH_IDEA_CBC_SHA", 0x0021); |
|
1397 add("TLS_KRB5_WITH_IDEA_CBC_MD5", 0x0025); |
|
1398 add("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA", 0x0027); |
|
1399 add("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5", 0x002a); |
|
1400 |
|
1401 // Unsupported cipher suites from RFC 4162 |
|
1402 add("TLS_RSA_WITH_SEED_CBC_SHA", 0x0096); |
|
1403 add("TLS_DH_DSS_WITH_SEED_CBC_SHA", 0x0097); |
|
1404 add("TLS_DH_RSA_WITH_SEED_CBC_SHA", 0x0098); |
|
1405 add("TLS_DHE_DSS_WITH_SEED_CBC_SHA", 0x0099); |
|
1406 add("TLS_DHE_RSA_WITH_SEED_CBC_SHA", 0x009a); |
|
1407 add("TLS_DH_anon_WITH_SEED_CBC_SHA", 0x009b); |
|
1408 |
|
1409 // Unsupported cipher suites from RFC 4279 |
|
1410 add("TLS_PSK_WITH_RC4_128_SHA", 0x008a); |
|
1411 add("TLS_PSK_WITH_3DES_EDE_CBC_SHA", 0x008b); |
|
1412 add("TLS_PSK_WITH_AES_128_CBC_SHA", 0x008c); |
|
1413 add("TLS_PSK_WITH_AES_256_CBC_SHA", 0x008d); |
|
1414 add("TLS_DHE_PSK_WITH_RC4_128_SHA", 0x008e); |
|
1415 add("TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA", 0x008f); |
|
1416 add("TLS_DHE_PSK_WITH_AES_128_CBC_SHA", 0x0090); |
|
1417 add("TLS_DHE_PSK_WITH_AES_256_CBC_SHA", 0x0091); |
|
1418 add("TLS_RSA_PSK_WITH_RC4_128_SHA", 0x0092); |
|
1419 add("TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA", 0x0093); |
|
1420 add("TLS_RSA_PSK_WITH_AES_128_CBC_SHA", 0x0094); |
|
1421 add("TLS_RSA_PSK_WITH_AES_256_CBC_SHA", 0x0095); |
|
1422 |
|
1423 // Unsupported cipher suites from RFC 4785 |
|
1424 add("TLS_PSK_WITH_NULL_SHA", 0x002c); |
|
1425 add("TLS_DHE_PSK_WITH_NULL_SHA", 0x002d); |
|
1426 add("TLS_RSA_PSK_WITH_NULL_SHA", 0x002e); |
|
1427 |
|
1428 // Unsupported cipher suites from RFC 5246 |
|
1429 add("TLS_DH_DSS_WITH_AES_128_CBC_SHA", 0x0030); |
|
1430 add("TLS_DH_RSA_WITH_AES_128_CBC_SHA", 0x0031); |
|
1431 add("TLS_DH_DSS_WITH_AES_256_CBC_SHA", 0x0036); |
|
1432 add("TLS_DH_RSA_WITH_AES_256_CBC_SHA", 0x0037); |
|
1433 add("TLS_DH_DSS_WITH_AES_128_CBC_SHA256", 0x003e); |
|
1434 add("TLS_DH_RSA_WITH_AES_128_CBC_SHA256", 0x003f); |
|
1435 add("TLS_DH_DSS_WITH_AES_256_CBC_SHA256", 0x0068); |
|
1436 add("TLS_DH_RSA_WITH_AES_256_CBC_SHA256", 0x0069); |
|
1437 |
|
1438 // Unsupported cipher suites from RFC 5288 |
|
1439 add("TLS_DH_RSA_WITH_AES_128_GCM_SHA256", 0x00a0); |
|
1440 add("TLS_DH_RSA_WITH_AES_256_GCM_SHA384", 0x00a1); |
|
1441 add("TLS_DH_DSS_WITH_AES_128_GCM_SHA256", 0x00a4); |
|
1442 add("TLS_DH_DSS_WITH_AES_256_GCM_SHA384", 0x00a5); |
|
1443 |
|
1444 // Unsupported cipher suites from RFC 5487 |
|
1445 add("TLS_PSK_WITH_AES_128_GCM_SHA256", 0x00a8); |
|
1446 add("TLS_PSK_WITH_AES_256_GCM_SHA384", 0x00a9); |
|
1447 add("TLS_DHE_PSK_WITH_AES_128_GCM_SHA256", 0x00aa); |
|
1448 add("TLS_DHE_PSK_WITH_AES_256_GCM_SHA384", 0x00ab); |
|
1449 add("TLS_RSA_PSK_WITH_AES_128_GCM_SHA256", 0x00ac); |
|
1450 add("TLS_RSA_PSK_WITH_AES_256_GCM_SHA384", 0x00ad); |
|
1451 add("TLS_PSK_WITH_AES_128_CBC_SHA256", 0x00ae); |
|
1452 add("TLS_PSK_WITH_AES_256_CBC_SHA384", 0x00af); |
|
1453 add("TLS_PSK_WITH_NULL_SHA256", 0x00b0); |
|
1454 add("TLS_PSK_WITH_NULL_SHA384", 0x00b1); |
|
1455 add("TLS_DHE_PSK_WITH_AES_128_CBC_SHA256", 0x00b2); |
|
1456 add("TLS_DHE_PSK_WITH_AES_256_CBC_SHA384", 0x00b3); |
|
1457 add("TLS_DHE_PSK_WITH_NULL_SHA256", 0x00b4); |
|
1458 add("TLS_DHE_PSK_WITH_NULL_SHA384", 0x00b5); |
|
1459 add("TLS_RSA_PSK_WITH_AES_128_CBC_SHA256", 0x00b6); |
|
1460 add("TLS_RSA_PSK_WITH_AES_256_CBC_SHA384", 0x00b7); |
|
1461 add("TLS_RSA_PSK_WITH_NULL_SHA256", 0x00b8); |
|
1462 add("TLS_RSA_PSK_WITH_NULL_SHA384", 0x00b9); |
|
1463 |
|
1464 // Unsupported cipher suites from RFC 5932 |
|
1465 add("TLS_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0041); |
|
1466 add("TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA", 0x0042); |
|
1467 add("TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0043); |
|
1468 add("TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA", 0x0044); |
|
1469 add("TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", 0x0045); |
|
1470 add("TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA", 0x0046); |
|
1471 add("TLS_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0084); |
|
1472 add("TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA", 0x0085); |
|
1473 add("TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0086); |
|
1474 add("TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA", 0x0087); |
|
1475 add("TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", 0x0088); |
|
1476 add("TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA", 0x0089); |
|
1477 add("TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00ba); |
|
1478 add("TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256", 0x00bb); |
|
1479 add("TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00bc); |
|
1480 add("TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256", 0x00bd); |
|
1481 add("TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0x00be); |
|
1482 add("TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256", 0x00bf); |
|
1483 add("TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c0); |
|
1484 add("TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256", 0x00c1); |
|
1485 add("TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c2); |
|
1486 add("TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256", 0x00c3); |
|
1487 add("TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", 0x00c4); |
|
1488 add("TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256", 0x00c5); |
|
1489 |
|
1490 // TLS Fallback Signaling Cipher Suite Value (SCSV) RFC 7507 |
|
1491 add("TLS_FALLBACK_SCSV", 0x5600); |
|
1492 |
|
1493 // Unsupported cipher suites from RFC 5054 |
|
1494 add("TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA", 0xc01a); |
|
1495 add("TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA", 0xc01b); |
|
1496 add("TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA", 0xc01c); |
|
1497 add("TLS_SRP_SHA_WITH_AES_128_CBC_SHA", 0xc01d); |
|
1498 add("TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA", 0xc01e); |
|
1499 add("TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA", 0xc01f); |
|
1500 add("TLS_SRP_SHA_WITH_AES_256_CBC_SHA", 0xc020); |
|
1501 add("TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA", 0xc021); |
|
1502 add("TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA", 0xc022); |
|
1503 |
|
1504 // Unsupported cipher suites from RFC 5489 |
|
1505 add("TLS_ECDHE_PSK_WITH_RC4_128_SHA", 0xc033); |
|
1506 add("TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA", 0xc034); |
|
1507 add("TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", 0xc035); |
|
1508 add("TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", 0xc036); |
|
1509 add("TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256", 0xc037); |
|
1510 add("TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384", 0xc038); |
|
1511 add("TLS_ECDHE_PSK_WITH_NULL_SHA", 0xc039); |
|
1512 add("TLS_ECDHE_PSK_WITH_NULL_SHA256", 0xc03a); |
|
1513 add("TLS_ECDHE_PSK_WITH_NULL_SHA384", 0xc03b); |
|
1514 |
|
1515 // Unsupported cipher suites from RFC 6209 |
|
1516 add("TLS_RSA_WITH_ARIA_128_CBC_SHA256", 0xc03c); |
|
1517 add("TLS_RSA_WITH_ARIA_256_CBC_SHA384", 0xc03d); |
|
1518 add("TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256", 0xc03e); |
|
1519 add("TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384", 0xc03f); |
|
1520 add("TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256", 0xc040); |
|
1521 add("TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384", 0xc041); |
|
1522 add("TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256", 0xc042); |
|
1523 add("TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384", 0xc043); |
|
1524 add("TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256", 0xc044); |
|
1525 add("TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384", 0xc045); |
|
1526 add("TLS_DH_anon_WITH_ARIA_128_CBC_SHA256", 0xc046); |
|
1527 add("TLS_DH_anon_WITH_ARIA_256_CBC_SHA384", 0xc047); |
|
1528 add("TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256", 0xc048); |
|
1529 add("TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384", 0xc049); |
|
1530 add("TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256", 0xc04a); |
|
1531 add("TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384", 0xc04b); |
|
1532 add("TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256", 0xc04c); |
|
1533 add("TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384", 0xc04d); |
|
1534 add("TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256", 0xc04e); |
|
1535 add("TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384", 0xc04f); |
|
1536 add("TLS_RSA_WITH_ARIA_128_GCM_SHA256", 0xc050); |
|
1537 add("TLS_RSA_WITH_ARIA_256_GCM_SHA384", 0xc051); |
|
1538 add("TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256", 0xc052); |
|
1539 add("TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384", 0xc053); |
|
1540 add("TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256", 0xc054); |
|
1541 add("TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384", 0xc055); |
|
1542 add("TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256", 0xc056); |
|
1543 add("TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384", 0xc057); |
|
1544 add("TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256", 0xc058); |
|
1545 add("TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384", 0xc059); |
|
1546 add("TLS_DH_anon_WITH_ARIA_128_GCM_SHA256", 0xc05a); |
|
1547 add("TLS_DH_anon_WITH_ARIA_256_GCM_SHA384", 0xc05b); |
|
1548 add("TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256", 0xc05c); |
|
1549 add("TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384", 0xc05d); |
|
1550 add("TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256", 0xc05e); |
|
1551 add("TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384", 0xc05f); |
|
1552 add("TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256", 0xc060); |
|
1553 add("TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384", 0xc061); |
|
1554 add("TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256", 0xc062); |
|
1555 add("TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384", 0xc063); |
|
1556 add("TLS_PSK_WITH_ARIA_128_CBC_SHA256", 0xc064); |
|
1557 add("TLS_PSK_WITH_ARIA_256_CBC_SHA384", 0xc065); |
|
1558 add("TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256", 0xc066); |
|
1559 add("TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384", 0xc067); |
|
1560 add("TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256", 0xc068); |
|
1561 add("TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384", 0xc069); |
|
1562 add("TLS_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06a); |
|
1563 add("TLS_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06b); |
|
1564 add("TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06c); |
|
1565 add("TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06d); |
|
1566 add("TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256", 0xc06e); |
|
1567 add("TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384", 0xc06f); |
|
1568 add("TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256", 0xc070); |
|
1569 add("TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384", 0xc071); |
|
1570 |
|
1571 // Unsupported cipher suites from RFC 6367 |
|
1572 add("TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc072); |
|
1573 add("TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc073); |
|
1574 add("TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc074); |
|
1575 add("TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc075); |
|
1576 add("TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc076); |
|
1577 add("TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc077); |
|
1578 add("TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256", 0xc078); |
|
1579 add("TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384", 0xc079); |
|
1580 add("TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07a); |
|
1581 add("TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07b); |
|
1582 add("TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07c); |
|
1583 add("TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07d); |
|
1584 add("TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc07e); |
|
1585 add("TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc07f); |
|
1586 add("TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256", 0xc080); |
|
1587 add("TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384", 0xc081); |
|
1588 add("TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256", 0xc082); |
|
1589 add("TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384", 0xc083); |
|
1590 add("TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256", 0xc084); |
|
1591 add("TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384", 0xc085); |
|
1592 add("TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc086); |
|
1593 add("TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc087); |
|
1594 add("TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc088); |
|
1595 add("TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc089); |
|
1596 add("TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc08a); |
|
1597 add("TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc08b); |
|
1598 add("TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256", 0xc08c); |
|
1599 add("TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384", 0xc08d); |
|
1600 add("TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc08e); |
|
1601 add("TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc08f); |
|
1602 add("TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc090); |
|
1603 add("TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc091); |
|
1604 add("TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256", 0xc092); |
|
1605 add("TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384", 0xc093); |
|
1606 add("TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc094); |
|
1607 add("TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc095); |
|
1608 add("TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc096); |
|
1609 add("TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc097); |
|
1610 add("TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc098); |
|
1611 add("TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc099); |
|
1612 add("TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", 0xc09a); |
|
1613 add("TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", 0xc09b); |
|
1614 |
|
1615 // Unsupported cipher suites from RFC 6655 |
|
1616 add("TLS_RSA_WITH_AES_128_CCM", 0xc09c); |
|
1617 add("TLS_RSA_WITH_AES_256_CCM", 0xc09d); |
|
1618 add("TLS_DHE_RSA_WITH_AES_128_CCM", 0xc09e); |
|
1619 add("TLS_DHE_RSA_WITH_AES_256_CCM", 0xc09f); |
|
1620 add("TLS_RSA_WITH_AES_128_CCM_8", 0xc0A0); |
|
1621 add("TLS_RSA_WITH_AES_256_CCM_8", 0xc0A1); |
|
1622 add("TLS_DHE_RSA_WITH_AES_128_CCM_8", 0xc0A2); |
|
1623 add("TLS_DHE_RSA_WITH_AES_256_CCM_8", 0xc0A3); |
|
1624 add("TLS_PSK_WITH_AES_128_CCM", 0xc0A4); |
|
1625 add("TLS_PSK_WITH_AES_256_CCM", 0xc0A5); |
|
1626 add("TLS_DHE_PSK_WITH_AES_128_CCM", 0xc0A6); |
|
1627 add("TLS_DHE_PSK_WITH_AES_256_CCM", 0xc0A7); |
|
1628 add("TLS_PSK_WITH_AES_128_CCM_8", 0xc0A8); |
|
1629 add("TLS_PSK_WITH_AES_256_CCM_8", 0xc0A9); |
|
1630 add("TLS_PSK_DHE_WITH_AES_128_CCM_8", 0xc0Aa); |
|
1631 add("TLS_PSK_DHE_WITH_AES_256_CCM_8", 0xc0Ab); |
|
1632 |
|
1633 // Unsupported cipher suites from RFC 7251 |
|
1634 add("TLS_ECDHE_ECDSA_WITH_AES_128_CCM", 0xc0Ac); |
|
1635 add("TLS_ECDHE_ECDSA_WITH_AES_256_CCM", 0xc0Ad); |
|
1636 add("TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", 0xc0Ae); |
|
1637 add("TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", 0xc0Af); |
|
1638 } |
|
1639 |
|
1640 // ciphersuite SSL_NULL_WITH_NULL_NULL |
|
1641 static final CipherSuite C_NULL = CipherSuite.valueOf(0, 0); |
|
1642 |
|
1643 // ciphersuite TLS_EMPTY_RENEGOTIATION_INFO_SCSV |
|
1644 static final CipherSuite C_SCSV = CipherSuite.valueOf(0x00, 0xff); |
|
1645 } |
1166 } |