4db2b6a0db80b88c3fffbb015ca70cf0aaf470cf
[openssl.git] / include / openssl / tls1.h
1 /*
2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
3  * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
4  * Copyright 2005 Nokia. All rights reserved.
5  *
6  * Licensed under the Apache License 2.0 (the "License").  You may not use
7  * this file except in compliance with the License.  You can obtain a copy
8  * in the file LICENSE in the source distribution or at
9  * https://www.openssl.org/source/license.html
10  */
11
12 #ifndef HEADER_TLS1_H
13 # define HEADER_TLS1_H
14
15 # include <openssl/buffer.h>
16 # include <openssl/x509.h>
17
18 #ifdef  __cplusplus
19 extern "C" {
20 #endif
21
22 /* Default security level if not overridden at config time */
23 # ifndef OPENSSL_TLS_SECURITY_LEVEL
24 #  define OPENSSL_TLS_SECURITY_LEVEL 1
25 # endif
26
27 # define TLS1_VERSION                    0x0301
28 # define TLS1_1_VERSION                  0x0302
29 # define TLS1_2_VERSION                  0x0303
30 # define TLS1_3_VERSION                  0x0304
31 # if !OPENSSL_API_3
32 #  define TLS_MAX_VERSION                TLS1_3_VERSION
33 # endif
34
35 /* Special value for method supporting multiple versions */
36 # define TLS_ANY_VERSION                 0x10000
37
38 # define TLS1_VERSION_MAJOR              0x03
39 # define TLS1_VERSION_MINOR              0x01
40
41 # define TLS1_1_VERSION_MAJOR            0x03
42 # define TLS1_1_VERSION_MINOR            0x02
43
44 # define TLS1_2_VERSION_MAJOR            0x03
45 # define TLS1_2_VERSION_MINOR            0x03
46
47 # define TLS1_get_version(s) \
48         ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
49
50 # define TLS1_get_client_version(s) \
51         ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
52
53 # define TLS1_AD_DECRYPTION_FAILED       21
54 # define TLS1_AD_RECORD_OVERFLOW         22
55 # define TLS1_AD_UNKNOWN_CA              48/* fatal */
56 # define TLS1_AD_ACCESS_DENIED           49/* fatal */
57 # define TLS1_AD_DECODE_ERROR            50/* fatal */
58 # define TLS1_AD_DECRYPT_ERROR           51
59 # define TLS1_AD_EXPORT_RESTRICTION      60/* fatal */
60 # define TLS1_AD_PROTOCOL_VERSION        70/* fatal */
61 # define TLS1_AD_INSUFFICIENT_SECURITY   71/* fatal */
62 # define TLS1_AD_INTERNAL_ERROR          80/* fatal */
63 # define TLS1_AD_INAPPROPRIATE_FALLBACK  86/* fatal */
64 # define TLS1_AD_USER_CANCELLED          90
65 # define TLS1_AD_NO_RENEGOTIATION        100
66 /* TLSv1.3 alerts */
67 # define TLS13_AD_MISSING_EXTENSION      109 /* fatal */
68 # define TLS13_AD_CERTIFICATE_REQUIRED   116 /* fatal */
69 /* codes 110-114 are from RFC3546 */
70 # define TLS1_AD_UNSUPPORTED_EXTENSION   110
71 # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
72 # define TLS1_AD_UNRECOGNIZED_NAME       112
73 # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
74 # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
75 # define TLS1_AD_UNKNOWN_PSK_IDENTITY    115/* fatal */
76 # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
77
78 /* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
79 # define TLSEXT_TYPE_server_name                 0
80 # define TLSEXT_TYPE_max_fragment_length         1
81 # define TLSEXT_TYPE_client_certificate_url      2
82 # define TLSEXT_TYPE_trusted_ca_keys             3
83 # define TLSEXT_TYPE_truncated_hmac              4
84 # define TLSEXT_TYPE_status_request              5
85 /* ExtensionType values from RFC4681 */
86 # define TLSEXT_TYPE_user_mapping                6
87 /* ExtensionType values from RFC5878 */
88 # define TLSEXT_TYPE_client_authz                7
89 # define TLSEXT_TYPE_server_authz                8
90 /* ExtensionType values from RFC6091 */
91 # define TLSEXT_TYPE_cert_type           9
92
93 /* ExtensionType values from RFC4492 */
94 /*
95  * Prior to TLSv1.3 the supported_groups extension was known as
96  * elliptic_curves
97  */
98 # define TLSEXT_TYPE_supported_groups            10
99 # define TLSEXT_TYPE_elliptic_curves             TLSEXT_TYPE_supported_groups
100 # define TLSEXT_TYPE_ec_point_formats            11
101
102
103 /* ExtensionType value from RFC5054 */
104 # define TLSEXT_TYPE_srp                         12
105
106 /* ExtensionType values from RFC5246 */
107 # define TLSEXT_TYPE_signature_algorithms        13
108
109 /* ExtensionType value from RFC5764 */
110 # define TLSEXT_TYPE_use_srtp    14
111
112 /* ExtensionType value from RFC7301 */
113 # define TLSEXT_TYPE_application_layer_protocol_negotiation 16
114
115 /*
116  * Extension type for Certificate Transparency
117  * https://tools.ietf.org/html/rfc6962#section-3.3.1
118  */
119 # define TLSEXT_TYPE_signed_certificate_timestamp    18
120
121 /*
122  * ExtensionType value for TLS padding extension.
123  * http://tools.ietf.org/html/draft-agl-tls-padding
124  */
125 # define TLSEXT_TYPE_padding     21
126
127 /* ExtensionType value from RFC7366 */
128 # define TLSEXT_TYPE_encrypt_then_mac    22
129
130 /* ExtensionType value from RFC7627 */
131 # define TLSEXT_TYPE_extended_master_secret      23
132
133 /* ExtensionType value from RFC4507 */
134 # define TLSEXT_TYPE_session_ticket              35
135
136 /* As defined for TLS1.3 */
137 # define TLSEXT_TYPE_psk                         41
138 # define TLSEXT_TYPE_early_data                  42
139 # define TLSEXT_TYPE_supported_versions          43
140 # define TLSEXT_TYPE_cookie                      44
141 # define TLSEXT_TYPE_psk_kex_modes               45
142 # define TLSEXT_TYPE_certificate_authorities     47
143 # define TLSEXT_TYPE_post_handshake_auth         49
144 # define TLSEXT_TYPE_signature_algorithms_cert   50
145 # define TLSEXT_TYPE_key_share                   51
146
147 /* Temporary extension type */
148 # define TLSEXT_TYPE_renegotiate                 0xff01
149
150 # ifndef OPENSSL_NO_NEXTPROTONEG
151 /* This is not an IANA defined extension number */
152 #  define TLSEXT_TYPE_next_proto_neg              13172
153 # endif
154
155 /* NameType value from RFC3546 */
156 # define TLSEXT_NAMETYPE_host_name 0
157 /* status request value from RFC3546 */
158 # define TLSEXT_STATUSTYPE_ocsp 1
159
160 /* ECPointFormat values from RFC4492 */
161 # define TLSEXT_ECPOINTFORMAT_first                      0
162 # define TLSEXT_ECPOINTFORMAT_uncompressed               0
163 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime  1
164 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2  2
165 # define TLSEXT_ECPOINTFORMAT_last                       2
166
167 /* Signature and hash algorithms from RFC5246 */
168 # define TLSEXT_signature_anonymous                      0
169 # define TLSEXT_signature_rsa                            1
170 # define TLSEXT_signature_dsa                            2
171 # define TLSEXT_signature_ecdsa                          3
172 # define TLSEXT_signature_gostr34102001                  237
173 # define TLSEXT_signature_gostr34102012_256              238
174 # define TLSEXT_signature_gostr34102012_512              239
175
176 /* Total number of different signature algorithms */
177 # define TLSEXT_signature_num                            7
178
179 # define TLSEXT_hash_none                                0
180 # define TLSEXT_hash_md5                                 1
181 # define TLSEXT_hash_sha1                                2
182 # define TLSEXT_hash_sha224                              3
183 # define TLSEXT_hash_sha256                              4
184 # define TLSEXT_hash_sha384                              5
185 # define TLSEXT_hash_sha512                              6
186 # define TLSEXT_hash_gostr3411                           237
187 # define TLSEXT_hash_gostr34112012_256                   238
188 # define TLSEXT_hash_gostr34112012_512                   239
189
190 /* Total number of different digest algorithms */
191
192 # define TLSEXT_hash_num                                 10
193
194 /* Flag set for unrecognised algorithms */
195 # define TLSEXT_nid_unknown                              0x1000000
196
197 /* ECC curves */
198
199 # define TLSEXT_curve_P_256                              23
200 # define TLSEXT_curve_P_384                              24
201
202 /* OpenSSL value to disable maximum fragment length extension */
203 # define TLSEXT_max_fragment_length_DISABLED    0
204 /* Allowed values for max fragment length extension */
205 # define TLSEXT_max_fragment_length_512         1
206 # define TLSEXT_max_fragment_length_1024        2
207 # define TLSEXT_max_fragment_length_2048        3
208 # define TLSEXT_max_fragment_length_4096        4
209
210 int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
211 int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
212
213 # define TLSEXT_MAXLEN_host_name 255
214
215 __owur const char *SSL_get_servername(const SSL *s, const int type);
216 __owur int SSL_get_servername_type(const SSL *s);
217 /*
218  * SSL_export_keying_material exports a value derived from the master secret,
219  * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
220  * optional context. (Since a zero length context is allowed, the |use_context|
221  * flag controls whether a context is included.) It returns 1 on success and
222  * 0 or -1 otherwise.
223  */
224 __owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
225                                       const char *label, size_t llen,
226                                       const unsigned char *context,
227                                       size_t contextlen, int use_context);
228
229 /*
230  * SSL_export_keying_material_early exports a value derived from the
231  * early exporter master secret, as specified in
232  * https://tools.ietf.org/html/draft-ietf-tls-tls13-23. It writes
233  * |olen| bytes to |out| given a label and optional context. It
234  * returns 1 on success and 0 otherwise.
235  */
236 __owur int SSL_export_keying_material_early(SSL *s, unsigned char *out,
237                                             size_t olen, const char *label,
238                                             size_t llen,
239                                             const unsigned char *context,
240                                             size_t contextlen);
241
242 int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
243 int SSL_get_signature_type_nid(const SSL *s, int *pnid);
244
245 int SSL_get_sigalgs(SSL *s, int idx,
246                     int *psign, int *phash, int *psignandhash,
247                     unsigned char *rsig, unsigned char *rhash);
248
249 int SSL_get_shared_sigalgs(SSL *s, int idx,
250                            int *psign, int *phash, int *psignandhash,
251                            unsigned char *rsig, unsigned char *rhash);
252
253 __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
254
255 # define SSL_set_tlsext_host_name(s,name) \
256         SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\
257                 (void *)name)
258
259 # define SSL_set_tlsext_debug_callback(ssl, cb) \
260         SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,\
261                 (void (*)(void))cb)
262
263 # define SSL_set_tlsext_debug_arg(ssl, arg) \
264         SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0,arg)
265
266 # define SSL_get_tlsext_status_type(ssl) \
267         SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
268
269 # define SSL_set_tlsext_status_type(ssl, type) \
270         SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
271
272 # define SSL_get_tlsext_status_exts(ssl, arg) \
273         SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0,arg)
274
275 # define SSL_set_tlsext_status_exts(ssl, arg) \
276         SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0,arg)
277
278 # define SSL_get_tlsext_status_ids(ssl, arg) \
279         SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0,arg)
280
281 # define SSL_set_tlsext_status_ids(ssl, arg) \
282         SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0,arg)
283
284 # define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
285         SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0,arg)
286
287 # define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
288         SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen,arg)
289
290 # define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
291         SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,\
292                 (void (*)(void))cb)
293
294 # define SSL_TLSEXT_ERR_OK 0
295 # define SSL_TLSEXT_ERR_ALERT_WARNING 1
296 # define SSL_TLSEXT_ERR_ALERT_FATAL 2
297 # define SSL_TLSEXT_ERR_NOACK 3
298
299 # define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
300         SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg)
301
302 # define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
303         SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys)
304 # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
305         SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys)
306
307 # define SSL_CTX_get_tlsext_status_cb(ssl, cb) \
308         SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0,(void *)cb)
309 # define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
310         SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,\
311                 (void (*)(void))cb)
312
313 # define SSL_CTX_get_tlsext_status_arg(ssl, arg) \
314         SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
315 # define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
316         SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
317
318 # define SSL_CTX_set_tlsext_status_type(ssl, type) \
319         SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
320
321 # define SSL_CTX_get_tlsext_status_type(ssl) \
322         SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
323
324 # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
325         SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\
326                 (void (*)(void))cb)
327
328 /* PSK ciphersuites from 4279 */
329 # define TLS1_CK_PSK_WITH_RC4_128_SHA                    0x0300008A
330 # define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA               0x0300008B
331 # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA                0x0300008C
332 # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA                0x0300008D
333 # define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA                0x0300008E
334 # define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA           0x0300008F
335 # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA            0x03000090
336 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA            0x03000091
337 # define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA                0x03000092
338 # define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA           0x03000093
339 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA            0x03000094
340 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA            0x03000095
341
342 /* PSK ciphersuites from 5487 */
343 # define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256             0x030000A8
344 # define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384             0x030000A9
345 # define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256         0x030000AA
346 # define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384         0x030000AB
347 # define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256         0x030000AC
348 # define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384         0x030000AD
349 # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256             0x030000AE
350 # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384             0x030000AF
351 # define TLS1_CK_PSK_WITH_NULL_SHA256                    0x030000B0
352 # define TLS1_CK_PSK_WITH_NULL_SHA384                    0x030000B1
353 # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256         0x030000B2
354 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384         0x030000B3
355 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA256                0x030000B4
356 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA384                0x030000B5
357 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256         0x030000B6
358 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384         0x030000B7
359 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA256                0x030000B8
360 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA384                0x030000B9
361
362 /* NULL PSK ciphersuites from RFC4785 */
363 # define TLS1_CK_PSK_WITH_NULL_SHA                       0x0300002C
364 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA                   0x0300002D
365 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA                   0x0300002E
366
367 /* AES ciphersuites from RFC3268 */
368 # define TLS1_CK_RSA_WITH_AES_128_SHA                    0x0300002F
369 # define TLS1_CK_DH_DSS_WITH_AES_128_SHA                 0x03000030
370 # define TLS1_CK_DH_RSA_WITH_AES_128_SHA                 0x03000031
371 # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA                0x03000032
372 # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA                0x03000033
373 # define TLS1_CK_ADH_WITH_AES_128_SHA                    0x03000034
374 # define TLS1_CK_RSA_WITH_AES_256_SHA                    0x03000035
375 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA                 0x03000036
376 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA                 0x03000037
377 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA                0x03000038
378 # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA                0x03000039
379 # define TLS1_CK_ADH_WITH_AES_256_SHA                    0x0300003A
380
381 /* TLS v1.2 ciphersuites */
382 # define TLS1_CK_RSA_WITH_NULL_SHA256                    0x0300003B
383 # define TLS1_CK_RSA_WITH_AES_128_SHA256                 0x0300003C
384 # define TLS1_CK_RSA_WITH_AES_256_SHA256                 0x0300003D
385 # define TLS1_CK_DH_DSS_WITH_AES_128_SHA256              0x0300003E
386 # define TLS1_CK_DH_RSA_WITH_AES_128_SHA256              0x0300003F
387 # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256             0x03000040
388
389 /* Camellia ciphersuites from RFC4132 */
390 # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA           0x03000041
391 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA        0x03000042
392 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA        0x03000043
393 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA       0x03000044
394 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA       0x03000045
395 # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA           0x03000046
396
397 /* TLS v1.2 ciphersuites */
398 # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256             0x03000067
399 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA256              0x03000068
400 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA256              0x03000069
401 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256             0x0300006A
402 # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256             0x0300006B
403 # define TLS1_CK_ADH_WITH_AES_128_SHA256                 0x0300006C
404 # define TLS1_CK_ADH_WITH_AES_256_SHA256                 0x0300006D
405
406 /* Camellia ciphersuites from RFC4132 */
407 # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA           0x03000084
408 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA        0x03000085
409 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA        0x03000086
410 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA       0x03000087
411 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA       0x03000088
412 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA           0x03000089
413
414 /* SEED ciphersuites from RFC4162 */
415 # define TLS1_CK_RSA_WITH_SEED_SHA                       0x03000096
416 # define TLS1_CK_DH_DSS_WITH_SEED_SHA                    0x03000097
417 # define TLS1_CK_DH_RSA_WITH_SEED_SHA                    0x03000098
418 # define TLS1_CK_DHE_DSS_WITH_SEED_SHA                   0x03000099
419 # define TLS1_CK_DHE_RSA_WITH_SEED_SHA                   0x0300009A
420 # define TLS1_CK_ADH_WITH_SEED_SHA                       0x0300009B
421
422 /* TLS v1.2 GCM ciphersuites from RFC5288 */
423 # define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256             0x0300009C
424 # define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384             0x0300009D
425 # define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256         0x0300009E
426 # define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384         0x0300009F
427 # define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256          0x030000A0
428 # define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384          0x030000A1
429 # define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256         0x030000A2
430 # define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384         0x030000A3
431 # define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256          0x030000A4
432 # define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384          0x030000A5
433 # define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256             0x030000A6
434 # define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384             0x030000A7
435
436 /* CCM ciphersuites from RFC6655 */
437 # define TLS1_CK_RSA_WITH_AES_128_CCM                    0x0300C09C
438 # define TLS1_CK_RSA_WITH_AES_256_CCM                    0x0300C09D
439 # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM                0x0300C09E
440 # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM                0x0300C09F
441 # define TLS1_CK_RSA_WITH_AES_128_CCM_8                  0x0300C0A0
442 # define TLS1_CK_RSA_WITH_AES_256_CCM_8                  0x0300C0A1
443 # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8              0x0300C0A2
444 # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8              0x0300C0A3
445 # define TLS1_CK_PSK_WITH_AES_128_CCM                    0x0300C0A4
446 # define TLS1_CK_PSK_WITH_AES_256_CCM                    0x0300C0A5
447 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM                0x0300C0A6
448 # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM                0x0300C0A7
449 # define TLS1_CK_PSK_WITH_AES_128_CCM_8                  0x0300C0A8
450 # define TLS1_CK_PSK_WITH_AES_256_CCM_8                  0x0300C0A9
451 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8              0x0300C0AA
452 # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8              0x0300C0AB
453
454 /* CCM ciphersuites from RFC7251 */
455 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM            0x0300C0AC
456 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM            0x0300C0AD
457 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8          0x0300C0AE
458 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8          0x0300C0AF
459
460 /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
461 # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256                0x030000BA
462 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256             0x030000BB
463 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256             0x030000BC
464 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256            0x030000BD
465 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256            0x030000BE
466 # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256                0x030000BF
467
468 # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256                0x030000C0
469 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256             0x030000C1
470 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256             0x030000C2
471 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256            0x030000C3
472 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256            0x030000C4
473 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256                0x030000C5
474
475 /* ECC ciphersuites from RFC4492 */
476 # define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA                0x0300C001
477 # define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA             0x0300C002
478 # define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA        0x0300C003
479 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA         0x0300C004
480 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA         0x0300C005
481
482 # define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA               0x0300C006
483 # define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA            0x0300C007
484 # define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA       0x0300C008
485 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA        0x0300C009
486 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA        0x0300C00A
487
488 # define TLS1_CK_ECDH_RSA_WITH_NULL_SHA                  0x0300C00B
489 # define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA               0x0300C00C
490 # define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA          0x0300C00D
491 # define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA           0x0300C00E
492 # define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA           0x0300C00F
493
494 # define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA                 0x0300C010
495 # define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA              0x0300C011
496 # define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA         0x0300C012
497 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA          0x0300C013
498 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA          0x0300C014
499
500 # define TLS1_CK_ECDH_anon_WITH_NULL_SHA                 0x0300C015
501 # define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA              0x0300C016
502 # define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA         0x0300C017
503 # define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA          0x0300C018
504 # define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA          0x0300C019
505
506 /* SRP ciphersuites from RFC 5054 */
507 # define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA           0x0300C01A
508 # define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA       0x0300C01B
509 # define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA       0x0300C01C
510 # define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA            0x0300C01D
511 # define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA        0x0300C01E
512 # define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA        0x0300C01F
513 # define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA            0x0300C020
514 # define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA        0x0300C021
515 # define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA        0x0300C022
516
517 /* ECDH HMAC based ciphersuites from RFC5289 */
518 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256         0x0300C023
519 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384         0x0300C024
520 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256          0x0300C025
521 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384          0x0300C026
522 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256           0x0300C027
523 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384           0x0300C028
524 # define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256            0x0300C029
525 # define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384            0x0300C02A
526
527 /* ECDH GCM based ciphersuites from RFC5289 */
528 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256     0x0300C02B
529 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384     0x0300C02C
530 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256      0x0300C02D
531 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384      0x0300C02E
532 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256       0x0300C02F
533 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384       0x0300C030
534 # define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256        0x0300C031
535 # define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384        0x0300C032
536
537 /* ECDHE PSK ciphersuites from RFC5489 */
538 # define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA              0x0300C033
539 # define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA         0x0300C034
540 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA          0x0300C035
541 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA          0x0300C036
542
543 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256       0x0300C037
544 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384       0x0300C038
545
546 /* NULL PSK ciphersuites from RFC4785 */
547 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA                 0x0300C039
548 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256              0x0300C03A
549 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384              0x0300C03B
550
551 /* Camellia-CBC ciphersuites from RFC6367 */
552 # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072
553 # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073
554 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256  0x0300C074
555 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384  0x0300C075
556 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   0x0300C076
557 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384   0x0300C077
558 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256    0x0300C078
559 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384    0x0300C079
560
561 # define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256         0x0300C094
562 # define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384         0x0300C095
563 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256     0x0300C096
564 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384     0x0300C097
565 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256     0x0300C098
566 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384     0x0300C099
567 # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256   0x0300C09A
568 # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384   0x0300C09B
569
570 /* draft-ietf-tls-chacha20-poly1305-03 */
571 # define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305         0x0300CCA8
572 # define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305       0x0300CCA9
573 # define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305           0x0300CCAA
574 # define TLS1_CK_PSK_WITH_CHACHA20_POLY1305               0x0300CCAB
575 # define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305         0x0300CCAC
576 # define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305           0x0300CCAD
577 # define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305           0x0300CCAE
578
579 /* TLS v1.3 ciphersuites */
580 # define TLS1_3_CK_AES_128_GCM_SHA256                     0x03001301
581 # define TLS1_3_CK_AES_256_GCM_SHA384                     0x03001302
582 # define TLS1_3_CK_CHACHA20_POLY1305_SHA256               0x03001303
583 # define TLS1_3_CK_AES_128_CCM_SHA256                     0x03001304
584 # define TLS1_3_CK_AES_128_CCM_8_SHA256                   0x03001305
585
586 /* Aria ciphersuites from RFC6209 */
587 # define TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256             0x0300C050
588 # define TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384             0x0300C051
589 # define TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256         0x0300C052
590 # define TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384         0x0300C053
591 # define TLS1_CK_DH_RSA_WITH_ARIA_128_GCM_SHA256          0x0300C054
592 # define TLS1_CK_DH_RSA_WITH_ARIA_256_GCM_SHA384          0x0300C055
593 # define TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256         0x0300C056
594 # define TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384         0x0300C057
595 # define TLS1_CK_DH_DSS_WITH_ARIA_128_GCM_SHA256          0x0300C058
596 # define TLS1_CK_DH_DSS_WITH_ARIA_256_GCM_SHA384          0x0300C059
597 # define TLS1_CK_DH_anon_WITH_ARIA_128_GCM_SHA256         0x0300C05A
598 # define TLS1_CK_DH_anon_WITH_ARIA_256_GCM_SHA384         0x0300C05B
599 # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256     0x0300C05C
600 # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384     0x0300C05D
601 # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256      0x0300C05E
602 # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384      0x0300C05F
603 # define TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256       0x0300C060
604 # define TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384       0x0300C061
605 # define TLS1_CK_ECDH_RSA_WITH_ARIA_128_GCM_SHA256        0x0300C062
606 # define TLS1_CK_ECDH_RSA_WITH_ARIA_256_GCM_SHA384        0x0300C063
607 # define TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256             0x0300C06A
608 # define TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384             0x0300C06B
609 # define TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256         0x0300C06C
610 # define TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384         0x0300C06D
611 # define TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256         0x0300C06E
612 # define TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384         0x0300C06F
613
614 /* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */
615 # define TLS1_RFC_RSA_WITH_AES_128_SHA                   "TLS_RSA_WITH_AES_128_CBC_SHA"
616 # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA               "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
617 # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA               "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
618 # define TLS1_RFC_ADH_WITH_AES_128_SHA                   "TLS_DH_anon_WITH_AES_128_CBC_SHA"
619 # define TLS1_RFC_RSA_WITH_AES_256_SHA                   "TLS_RSA_WITH_AES_256_CBC_SHA"
620 # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA               "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
621 # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA               "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
622 # define TLS1_RFC_ADH_WITH_AES_256_SHA                   "TLS_DH_anon_WITH_AES_256_CBC_SHA"
623 # define TLS1_RFC_RSA_WITH_NULL_SHA256                   "TLS_RSA_WITH_NULL_SHA256"
624 # define TLS1_RFC_RSA_WITH_AES_128_SHA256                "TLS_RSA_WITH_AES_128_CBC_SHA256"
625 # define TLS1_RFC_RSA_WITH_AES_256_SHA256                "TLS_RSA_WITH_AES_256_CBC_SHA256"
626 # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256            "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
627 # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256            "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"
628 # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256            "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
629 # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256            "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"
630 # define TLS1_RFC_ADH_WITH_AES_128_SHA256                "TLS_DH_anon_WITH_AES_128_CBC_SHA256"
631 # define TLS1_RFC_ADH_WITH_AES_256_SHA256                "TLS_DH_anon_WITH_AES_256_CBC_SHA256"
632 # define TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256            "TLS_RSA_WITH_AES_128_GCM_SHA256"
633 # define TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384            "TLS_RSA_WITH_AES_256_GCM_SHA384"
634 # define TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256        "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"
635 # define TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384        "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
636 # define TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256        "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256"
637 # define TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384        "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"
638 # define TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256            "TLS_DH_anon_WITH_AES_128_GCM_SHA256"
639 # define TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384            "TLS_DH_anon_WITH_AES_256_GCM_SHA384"
640 # define TLS1_RFC_RSA_WITH_AES_128_CCM                   "TLS_RSA_WITH_AES_128_CCM"
641 # define TLS1_RFC_RSA_WITH_AES_256_CCM                   "TLS_RSA_WITH_AES_256_CCM"
642 # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM               "TLS_DHE_RSA_WITH_AES_128_CCM"
643 # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM               "TLS_DHE_RSA_WITH_AES_256_CCM"
644 # define TLS1_RFC_RSA_WITH_AES_128_CCM_8                 "TLS_RSA_WITH_AES_128_CCM_8"
645 # define TLS1_RFC_RSA_WITH_AES_256_CCM_8                 "TLS_RSA_WITH_AES_256_CCM_8"
646 # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8             "TLS_DHE_RSA_WITH_AES_128_CCM_8"
647 # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8             "TLS_DHE_RSA_WITH_AES_256_CCM_8"
648 # define TLS1_RFC_PSK_WITH_AES_128_CCM                   "TLS_PSK_WITH_AES_128_CCM"
649 # define TLS1_RFC_PSK_WITH_AES_256_CCM                   "TLS_PSK_WITH_AES_256_CCM"
650 # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM               "TLS_DHE_PSK_WITH_AES_128_CCM"
651 # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM               "TLS_DHE_PSK_WITH_AES_256_CCM"
652 # define TLS1_RFC_PSK_WITH_AES_128_CCM_8                 "TLS_PSK_WITH_AES_128_CCM_8"
653 # define TLS1_RFC_PSK_WITH_AES_256_CCM_8                 "TLS_PSK_WITH_AES_256_CCM_8"
654 # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8             "TLS_PSK_DHE_WITH_AES_128_CCM_8"
655 # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8             "TLS_PSK_DHE_WITH_AES_256_CCM_8"
656 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM           "TLS_ECDHE_ECDSA_WITH_AES_128_CCM"
657 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM           "TLS_ECDHE_ECDSA_WITH_AES_256_CCM"
658 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8         "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"
659 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8         "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8"
660 # define TLS1_3_RFC_AES_128_GCM_SHA256                   "TLS_AES_128_GCM_SHA256"
661 # define TLS1_3_RFC_AES_256_GCM_SHA384                   "TLS_AES_256_GCM_SHA384"
662 # define TLS1_3_RFC_CHACHA20_POLY1305_SHA256             "TLS_CHACHA20_POLY1305_SHA256"
663 # define TLS1_3_RFC_AES_128_CCM_SHA256                   "TLS_AES_128_CCM_SHA256"
664 # define TLS1_3_RFC_AES_128_CCM_8_SHA256                 "TLS_AES_128_CCM_8_SHA256"
665 # define TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA              "TLS_ECDHE_ECDSA_WITH_NULL_SHA"
666 # define TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"
667 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
668 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
669 # define TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA                "TLS_ECDHE_RSA_WITH_NULL_SHA"
670 # define TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA        "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"
671 # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA         "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
672 # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA         "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
673 # define TLS1_RFC_ECDH_anon_WITH_NULL_SHA                "TLS_ECDH_anon_WITH_NULL_SHA"
674 # define TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA        "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
675 # define TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA         "TLS_ECDH_anon_WITH_AES_128_CBC_SHA"
676 # define TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA         "TLS_ECDH_anon_WITH_AES_256_CBC_SHA"
677 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256        "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
678 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384        "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"
679 # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256          "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
680 # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384          "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"
681 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256    "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
682 # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384    "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
683 # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256      "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
684 # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384      "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
685 # define TLS1_RFC_PSK_WITH_NULL_SHA                      "TLS_PSK_WITH_NULL_SHA"
686 # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA                  "TLS_DHE_PSK_WITH_NULL_SHA"
687 # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA                  "TLS_RSA_PSK_WITH_NULL_SHA"
688 # define TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA              "TLS_PSK_WITH_3DES_EDE_CBC_SHA"
689 # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA               "TLS_PSK_WITH_AES_128_CBC_SHA"
690 # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA               "TLS_PSK_WITH_AES_256_CBC_SHA"
691 # define TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA          "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA"
692 # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA           "TLS_DHE_PSK_WITH_AES_128_CBC_SHA"
693 # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA           "TLS_DHE_PSK_WITH_AES_256_CBC_SHA"
694 # define TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA          "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA"
695 # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA           "TLS_RSA_PSK_WITH_AES_128_CBC_SHA"
696 # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA           "TLS_RSA_PSK_WITH_AES_256_CBC_SHA"
697 # define TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256            "TLS_PSK_WITH_AES_128_GCM_SHA256"
698 # define TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384            "TLS_PSK_WITH_AES_256_GCM_SHA384"
699 # define TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256        "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256"
700 # define TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384        "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384"
701 # define TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256        "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256"
702 # define TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384        "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384"
703 # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256            "TLS_PSK_WITH_AES_128_CBC_SHA256"
704 # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384            "TLS_PSK_WITH_AES_256_CBC_SHA384"
705 # define TLS1_RFC_PSK_WITH_NULL_SHA256                   "TLS_PSK_WITH_NULL_SHA256"
706 # define TLS1_RFC_PSK_WITH_NULL_SHA384                   "TLS_PSK_WITH_NULL_SHA384"
707 # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256        "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256"
708 # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384        "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384"
709 # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA256               "TLS_DHE_PSK_WITH_NULL_SHA256"
710 # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA384               "TLS_DHE_PSK_WITH_NULL_SHA384"
711 # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256        "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256"
712 # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384        "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384"
713 # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA256               "TLS_RSA_PSK_WITH_NULL_SHA256"
714 # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA384               "TLS_RSA_PSK_WITH_NULL_SHA384"
715 # define TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA        "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA"
716 # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA         "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA"
717 # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA         "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA"
718 # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256      "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256"
719 # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384      "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384"
720 # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA                "TLS_ECDHE_PSK_WITH_NULL_SHA"
721 # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256             "TLS_ECDHE_PSK_WITH_NULL_SHA256"
722 # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384             "TLS_ECDHE_PSK_WITH_NULL_SHA384"
723 # define TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA          "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA"
724 # define TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA      "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA"
725 # define TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA      "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA"
726 # define TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA           "TLS_SRP_SHA_WITH_AES_128_CBC_SHA"
727 # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA       "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA"
728 # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA       "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA"
729 # define TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA           "TLS_SRP_SHA_WITH_AES_256_CBC_SHA"
730 # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA       "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA"
731 # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA       "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA"
732 # define TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305         "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
733 # define TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305       "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
734 # define TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305     "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
735 # define TLS1_RFC_PSK_WITH_CHACHA20_POLY1305             "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256"
736 # define TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305       "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
737 # define TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305         "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
738 # define TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305         "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256"
739 # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256       "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256"
740 # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256   "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256"
741 # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
742 # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256       "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256"
743 # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256       "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256"
744 # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256   "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256"
745 # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256   "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256"
746 # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256       "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256"
747 # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA          "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA"
748 # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA      "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA"
749 # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA      "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA"
750 # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA          "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA"
751 # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA          "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA"
752 # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA      "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA"
753 # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA      "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA"
754 # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA          "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA"
755 # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256"
756 # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384"
757 # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
758 # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384"
759 # define TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256       "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256"
760 # define TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384       "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384"
761 # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256   "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
762 # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384   "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
763 # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256   "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256"
764 # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384   "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384"
765 # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
766 # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
767 # define TLS1_RFC_RSA_WITH_SEED_SHA                      "TLS_RSA_WITH_SEED_CBC_SHA"
768 # define TLS1_RFC_DHE_DSS_WITH_SEED_SHA                  "TLS_DHE_DSS_WITH_SEED_CBC_SHA"
769 # define TLS1_RFC_DHE_RSA_WITH_SEED_SHA                  "TLS_DHE_RSA_WITH_SEED_CBC_SHA"
770 # define TLS1_RFC_ADH_WITH_SEED_SHA                      "TLS_DH_anon_WITH_SEED_CBC_SHA"
771 # define TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA             "TLS_ECDHE_PSK_WITH_RC4_128_SHA"
772 # define TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA             "TLS_ECDH_anon_WITH_RC4_128_SHA"
773 # define TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA           "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
774 # define TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA             "TLS_ECDHE_RSA_WITH_RC4_128_SHA"
775 # define TLS1_RFC_PSK_WITH_RC4_128_SHA                   "TLS_PSK_WITH_RC4_128_SHA"
776 # define TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA               "TLS_RSA_PSK_WITH_RC4_128_SHA"
777 # define TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA               "TLS_DHE_PSK_WITH_RC4_128_SHA"
778 # define TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256           "TLS_RSA_WITH_ARIA_128_GCM_SHA256"
779 # define TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384           "TLS_RSA_WITH_ARIA_256_GCM_SHA384"
780 # define TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256       "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256"
781 # define TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384       "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384"
782 # define TLS1_RFC_DH_RSA_WITH_ARIA_128_GCM_SHA256        "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256"
783 # define TLS1_RFC_DH_RSA_WITH_ARIA_256_GCM_SHA384        "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384"
784 # define TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256       "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256"
785 # define TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384       "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384"
786 # define TLS1_RFC_DH_DSS_WITH_ARIA_128_GCM_SHA256        "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256"
787 # define TLS1_RFC_DH_DSS_WITH_ARIA_256_GCM_SHA384        "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384"
788 # define TLS1_RFC_DH_anon_WITH_ARIA_128_GCM_SHA256       "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256"
789 # define TLS1_RFC_DH_anon_WITH_ARIA_256_GCM_SHA384       "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384"
790 # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256   "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256"
791 # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384   "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384"
792 # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256    "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256"
793 # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384    "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384"
794 # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256     "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256"
795 # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384     "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384"
796 # define TLS1_RFC_ECDH_RSA_WITH_ARIA_128_GCM_SHA256      "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256"
797 # define TLS1_RFC_ECDH_RSA_WITH_ARIA_256_GCM_SHA384      "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384"
798 # define TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256           "TLS_PSK_WITH_ARIA_128_GCM_SHA256"
799 # define TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384           "TLS_PSK_WITH_ARIA_256_GCM_SHA384"
800 # define TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256       "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256"
801 # define TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384       "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384"
802 # define TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256       "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256"
803 # define TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384       "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384"
804
805
806 /*
807  * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE
808  * ciphers names with "EDH" instead of "DHE".  Going forward, we should be
809  * using DHE everywhere, though we may indefinitely maintain aliases for
810  * users or configurations that used "EDH"
811  */
812 # define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA               "DHE-DSS-RC4-SHA"
813
814 # define TLS1_TXT_PSK_WITH_NULL_SHA                      "PSK-NULL-SHA"
815 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA                  "DHE-PSK-NULL-SHA"
816 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA                  "RSA-PSK-NULL-SHA"
817
818 /* AES ciphersuites from RFC3268 */
819 # define TLS1_TXT_RSA_WITH_AES_128_SHA                   "AES128-SHA"
820 # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA                "DH-DSS-AES128-SHA"
821 # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA                "DH-RSA-AES128-SHA"
822 # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA               "DHE-DSS-AES128-SHA"
823 # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA               "DHE-RSA-AES128-SHA"
824 # define TLS1_TXT_ADH_WITH_AES_128_SHA                   "ADH-AES128-SHA"
825
826 # define TLS1_TXT_RSA_WITH_AES_256_SHA                   "AES256-SHA"
827 # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA                "DH-DSS-AES256-SHA"
828 # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA                "DH-RSA-AES256-SHA"
829 # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA               "DHE-DSS-AES256-SHA"
830 # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA               "DHE-RSA-AES256-SHA"
831 # define TLS1_TXT_ADH_WITH_AES_256_SHA                   "ADH-AES256-SHA"
832
833 /* ECC ciphersuites from RFC4492 */
834 # define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA               "ECDH-ECDSA-NULL-SHA"
835 # define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA            "ECDH-ECDSA-RC4-SHA"
836 # define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA       "ECDH-ECDSA-DES-CBC3-SHA"
837 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA        "ECDH-ECDSA-AES128-SHA"
838 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA        "ECDH-ECDSA-AES256-SHA"
839
840 # define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA              "ECDHE-ECDSA-NULL-SHA"
841 # define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA           "ECDHE-ECDSA-RC4-SHA"
842 # define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      "ECDHE-ECDSA-DES-CBC3-SHA"
843 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       "ECDHE-ECDSA-AES128-SHA"
844 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       "ECDHE-ECDSA-AES256-SHA"
845
846 # define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA                 "ECDH-RSA-NULL-SHA"
847 # define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA              "ECDH-RSA-RC4-SHA"
848 # define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA         "ECDH-RSA-DES-CBC3-SHA"
849 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA          "ECDH-RSA-AES128-SHA"
850 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA          "ECDH-RSA-AES256-SHA"
851
852 # define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA                "ECDHE-RSA-NULL-SHA"
853 # define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA             "ECDHE-RSA-RC4-SHA"
854 # define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA        "ECDHE-RSA-DES-CBC3-SHA"
855 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA         "ECDHE-RSA-AES128-SHA"
856 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA         "ECDHE-RSA-AES256-SHA"
857
858 # define TLS1_TXT_ECDH_anon_WITH_NULL_SHA                "AECDH-NULL-SHA"
859 # define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA             "AECDH-RC4-SHA"
860 # define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA        "AECDH-DES-CBC3-SHA"
861 # define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA         "AECDH-AES128-SHA"
862 # define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA         "AECDH-AES256-SHA"
863
864 /* PSK ciphersuites from RFC 4279 */
865 # define TLS1_TXT_PSK_WITH_RC4_128_SHA                   "PSK-RC4-SHA"
866 # define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA              "PSK-3DES-EDE-CBC-SHA"
867 # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA               "PSK-AES128-CBC-SHA"
868 # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA               "PSK-AES256-CBC-SHA"
869
870 # define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA               "DHE-PSK-RC4-SHA"
871 # define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA          "DHE-PSK-3DES-EDE-CBC-SHA"
872 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA           "DHE-PSK-AES128-CBC-SHA"
873 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA           "DHE-PSK-AES256-CBC-SHA"
874 # define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA               "RSA-PSK-RC4-SHA"
875 # define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA          "RSA-PSK-3DES-EDE-CBC-SHA"
876 # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA           "RSA-PSK-AES128-CBC-SHA"
877 # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA           "RSA-PSK-AES256-CBC-SHA"
878
879 /* PSK ciphersuites from RFC 5487 */
880 # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256            "PSK-AES128-GCM-SHA256"
881 # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384            "PSK-AES256-GCM-SHA384"
882 # define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256        "DHE-PSK-AES128-GCM-SHA256"
883 # define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384        "DHE-PSK-AES256-GCM-SHA384"
884 # define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256        "RSA-PSK-AES128-GCM-SHA256"
885 # define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384        "RSA-PSK-AES256-GCM-SHA384"
886
887 # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256            "PSK-AES128-CBC-SHA256"
888 # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384            "PSK-AES256-CBC-SHA384"
889 # define TLS1_TXT_PSK_WITH_NULL_SHA256                   "PSK-NULL-SHA256"
890 # define TLS1_TXT_PSK_WITH_NULL_SHA384                   "PSK-NULL-SHA384"
891
892 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256        "DHE-PSK-AES128-CBC-SHA256"
893 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384        "DHE-PSK-AES256-CBC-SHA384"
894 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256               "DHE-PSK-NULL-SHA256"
895 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384               "DHE-PSK-NULL-SHA384"
896
897 # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256        "RSA-PSK-AES128-CBC-SHA256"
898 # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384        "RSA-PSK-AES256-CBC-SHA384"
899 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256               "RSA-PSK-NULL-SHA256"
900 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384               "RSA-PSK-NULL-SHA384"
901
902 /* SRP ciphersuite from RFC 5054 */
903 # define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA          "SRP-3DES-EDE-CBC-SHA"
904 # define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA      "SRP-RSA-3DES-EDE-CBC-SHA"
905 # define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA      "SRP-DSS-3DES-EDE-CBC-SHA"
906 # define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA           "SRP-AES-128-CBC-SHA"
907 # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA       "SRP-RSA-AES-128-CBC-SHA"
908 # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA       "SRP-DSS-AES-128-CBC-SHA"
909 # define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA           "SRP-AES-256-CBC-SHA"
910 # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA       "SRP-RSA-AES-256-CBC-SHA"
911 # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA       "SRP-DSS-AES-256-CBC-SHA"
912
913 /* Camellia ciphersuites from RFC4132 */
914 # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA          "CAMELLIA128-SHA"
915 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA       "DH-DSS-CAMELLIA128-SHA"
916 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA       "DH-RSA-CAMELLIA128-SHA"
917 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA      "DHE-DSS-CAMELLIA128-SHA"
918 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA      "DHE-RSA-CAMELLIA128-SHA"
919 # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA          "ADH-CAMELLIA128-SHA"
920
921 # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA          "CAMELLIA256-SHA"
922 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA       "DH-DSS-CAMELLIA256-SHA"
923 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA       "DH-RSA-CAMELLIA256-SHA"
924 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA      "DHE-DSS-CAMELLIA256-SHA"
925 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA      "DHE-RSA-CAMELLIA256-SHA"
926 # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA          "ADH-CAMELLIA256-SHA"
927
928 /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
929 # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256               "CAMELLIA128-SHA256"
930 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256            "DH-DSS-CAMELLIA128-SHA256"
931 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256            "DH-RSA-CAMELLIA128-SHA256"
932 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256           "DHE-DSS-CAMELLIA128-SHA256"
933 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256           "DHE-RSA-CAMELLIA128-SHA256"
934 # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256               "ADH-CAMELLIA128-SHA256"
935
936 # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256               "CAMELLIA256-SHA256"
937 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256            "DH-DSS-CAMELLIA256-SHA256"
938 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256            "DH-RSA-CAMELLIA256-SHA256"
939 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256           "DHE-DSS-CAMELLIA256-SHA256"
940 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256           "DHE-RSA-CAMELLIA256-SHA256"
941 # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256               "ADH-CAMELLIA256-SHA256"
942
943 # define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256               "PSK-CAMELLIA128-SHA256"
944 # define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384               "PSK-CAMELLIA256-SHA384"
945 # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256           "DHE-PSK-CAMELLIA128-SHA256"
946 # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384           "DHE-PSK-CAMELLIA256-SHA384"
947 # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256           "RSA-PSK-CAMELLIA128-SHA256"
948 # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384           "RSA-PSK-CAMELLIA256-SHA384"
949 # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256         "ECDHE-PSK-CAMELLIA128-SHA256"
950 # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384         "ECDHE-PSK-CAMELLIA256-SHA384"
951
952 /* SEED ciphersuites from RFC4162 */
953 # define TLS1_TXT_RSA_WITH_SEED_SHA                      "SEED-SHA"
954 # define TLS1_TXT_DH_DSS_WITH_SEED_SHA                   "DH-DSS-SEED-SHA"
955 # define TLS1_TXT_DH_RSA_WITH_SEED_SHA                   "DH-RSA-SEED-SHA"
956 # define TLS1_TXT_DHE_DSS_WITH_SEED_SHA                  "DHE-DSS-SEED-SHA"
957 # define TLS1_TXT_DHE_RSA_WITH_SEED_SHA                  "DHE-RSA-SEED-SHA"
958 # define TLS1_TXT_ADH_WITH_SEED_SHA                      "ADH-SEED-SHA"
959
960 /* TLS v1.2 ciphersuites */
961 # define TLS1_TXT_RSA_WITH_NULL_SHA256                   "NULL-SHA256"
962 # define TLS1_TXT_RSA_WITH_AES_128_SHA256                "AES128-SHA256"
963 # define TLS1_TXT_RSA_WITH_AES_256_SHA256                "AES256-SHA256"
964 # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256             "DH-DSS-AES128-SHA256"
965 # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256             "DH-RSA-AES128-SHA256"
966 # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256            "DHE-DSS-AES128-SHA256"
967 # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256            "DHE-RSA-AES128-SHA256"
968 # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256             "DH-DSS-AES256-SHA256"
969 # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256             "DH-RSA-AES256-SHA256"
970 # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256            "DHE-DSS-AES256-SHA256"
971 # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256            "DHE-RSA-AES256-SHA256"
972 # define TLS1_TXT_ADH_WITH_AES_128_SHA256                "ADH-AES128-SHA256"
973 # define TLS1_TXT_ADH_WITH_AES_256_SHA256                "ADH-AES256-SHA256"
974
975 /* TLS v1.2 GCM ciphersuites from RFC5288 */
976 # define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256            "AES128-GCM-SHA256"
977 # define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384            "AES256-GCM-SHA384"
978 # define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256        "DHE-RSA-AES128-GCM-SHA256"
979 # define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384        "DHE-RSA-AES256-GCM-SHA384"
980 # define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256         "DH-RSA-AES128-GCM-SHA256"
981 # define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384         "DH-RSA-AES256-GCM-SHA384"
982 # define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256        "DHE-DSS-AES128-GCM-SHA256"
983 # define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384        "DHE-DSS-AES256-GCM-SHA384"
984 # define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256         "DH-DSS-AES128-GCM-SHA256"
985 # define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384         "DH-DSS-AES256-GCM-SHA384"
986 # define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256            "ADH-AES128-GCM-SHA256"
987 # define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384            "ADH-AES256-GCM-SHA384"
988
989 /* CCM ciphersuites from RFC6655 */
990 # define TLS1_TXT_RSA_WITH_AES_128_CCM                   "AES128-CCM"
991 # define TLS1_TXT_RSA_WITH_AES_256_CCM                   "AES256-CCM"
992 # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM               "DHE-RSA-AES128-CCM"
993 # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM               "DHE-RSA-AES256-CCM"
994
995 # define TLS1_TXT_RSA_WITH_AES_128_CCM_8                 "AES128-CCM8"
996 # define TLS1_TXT_RSA_WITH_AES_256_CCM_8                 "AES256-CCM8"
997 # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8             "DHE-RSA-AES128-CCM8"
998 # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8             "DHE-RSA-AES256-CCM8"
999
1000 # define TLS1_TXT_PSK_WITH_AES_128_CCM                   "PSK-AES128-CCM"
1001 # define TLS1_TXT_PSK_WITH_AES_256_CCM                   "PSK-AES256-CCM"
1002 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM               "DHE-PSK-AES128-CCM"
1003 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM               "DHE-PSK-AES256-CCM"
1004
1005 # define TLS1_TXT_PSK_WITH_AES_128_CCM_8                 "PSK-AES128-CCM8"
1006 # define TLS1_TXT_PSK_WITH_AES_256_CCM_8                 "PSK-AES256-CCM8"
1007 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8             "DHE-PSK-AES128-CCM8"
1008 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8             "DHE-PSK-AES256-CCM8"
1009
1010 /* CCM ciphersuites from RFC7251 */
1011 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM       "ECDHE-ECDSA-AES128-CCM"
1012 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM       "ECDHE-ECDSA-AES256-CCM"
1013 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8     "ECDHE-ECDSA-AES128-CCM8"
1014 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8     "ECDHE-ECDSA-AES256-CCM8"
1015
1016 /* ECDH HMAC based ciphersuites from RFC5289 */
1017 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256    "ECDHE-ECDSA-AES128-SHA256"
1018 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384    "ECDHE-ECDSA-AES256-SHA384"
1019 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256     "ECDH-ECDSA-AES128-SHA256"
1020 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384     "ECDH-ECDSA-AES256-SHA384"
1021 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256      "ECDHE-RSA-AES128-SHA256"
1022 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384      "ECDHE-RSA-AES256-SHA384"
1023 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256       "ECDH-RSA-AES128-SHA256"
1024 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384       "ECDH-RSA-AES256-SHA384"
1025
1026 /* ECDH GCM based ciphersuites from RFC5289 */
1027 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256    "ECDHE-ECDSA-AES128-GCM-SHA256"
1028 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384    "ECDHE-ECDSA-AES256-GCM-SHA384"
1029 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256     "ECDH-ECDSA-AES128-GCM-SHA256"
1030 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384     "ECDH-ECDSA-AES256-GCM-SHA384"
1031 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256      "ECDHE-RSA-AES128-GCM-SHA256"
1032 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384      "ECDHE-RSA-AES256-GCM-SHA384"
1033 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256       "ECDH-RSA-AES128-GCM-SHA256"
1034 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384       "ECDH-RSA-AES256-GCM-SHA384"
1035
1036 /* TLS v1.2 PSK GCM ciphersuites from RFC5487 */
1037 # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256            "PSK-AES128-GCM-SHA256"
1038 # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384            "PSK-AES256-GCM-SHA384"
1039
1040 /* ECDHE PSK ciphersuites from RFC 5489 */
1041 # define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA               "ECDHE-PSK-RC4-SHA"
1042 # define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA          "ECDHE-PSK-3DES-EDE-CBC-SHA"
1043 # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA           "ECDHE-PSK-AES128-CBC-SHA"
1044 # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA           "ECDHE-PSK-AES256-CBC-SHA"
1045
1046 # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256        "ECDHE-PSK-AES128-CBC-SHA256"
1047 # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384        "ECDHE-PSK-AES256-CBC-SHA384"
1048
1049 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA                  "ECDHE-PSK-NULL-SHA"
1050 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256               "ECDHE-PSK-NULL-SHA256"
1051 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384               "ECDHE-PSK-NULL-SHA384"
1052
1053 /* Camellia-CBC ciphersuites from RFC6367 */
1054 # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256"
1055 # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384"
1056 # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256  "ECDH-ECDSA-CAMELLIA128-SHA256"
1057 # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384  "ECDH-ECDSA-CAMELLIA256-SHA384"
1058 # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   "ECDHE-RSA-CAMELLIA128-SHA256"
1059 # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384   "ECDHE-RSA-CAMELLIA256-SHA384"
1060 # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256    "ECDH-RSA-CAMELLIA128-SHA256"
1061 # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384    "ECDH-RSA-CAMELLIA256-SHA384"
1062
1063 /* draft-ietf-tls-chacha20-poly1305-03 */
1064 # define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305         "ECDHE-RSA-CHACHA20-POLY1305"
1065 # define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305       "ECDHE-ECDSA-CHACHA20-POLY1305"
1066 # define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305           "DHE-RSA-CHACHA20-POLY1305"
1067 # define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305               "PSK-CHACHA20-POLY1305"
1068 # define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305         "ECDHE-PSK-CHACHA20-POLY1305"
1069 # define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305           "DHE-PSK-CHACHA20-POLY1305"
1070 # define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305           "RSA-PSK-CHACHA20-POLY1305"
1071
1072 /* Aria ciphersuites from RFC6209 */
1073 # define TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256             "ARIA128-GCM-SHA256"
1074 # define TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384             "ARIA256-GCM-SHA384"
1075 # define TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256         "DHE-RSA-ARIA128-GCM-SHA256"
1076 # define TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384         "DHE-RSA-ARIA256-GCM-SHA384"
1077 # define TLS1_TXT_DH_RSA_WITH_ARIA_128_GCM_SHA256          "DH-RSA-ARIA128-GCM-SHA256"
1078 # define TLS1_TXT_DH_RSA_WITH_ARIA_256_GCM_SHA384          "DH-RSA-ARIA256-GCM-SHA384"
1079 # define TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256         "DHE-DSS-ARIA128-GCM-SHA256"
1080 # define TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384         "DHE-DSS-ARIA256-GCM-SHA384"
1081 # define TLS1_TXT_DH_DSS_WITH_ARIA_128_GCM_SHA256          "DH-DSS-ARIA128-GCM-SHA256"
1082 # define TLS1_TXT_DH_DSS_WITH_ARIA_256_GCM_SHA384          "DH-DSS-ARIA256-GCM-SHA384"
1083 # define TLS1_TXT_DH_anon_WITH_ARIA_128_GCM_SHA256         "ADH-ARIA128-GCM-SHA256"
1084 # define TLS1_TXT_DH_anon_WITH_ARIA_256_GCM_SHA384         "ADH-ARIA256-GCM-SHA384"
1085 # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256     "ECDHE-ECDSA-ARIA128-GCM-SHA256"
1086 # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384     "ECDHE-ECDSA-ARIA256-GCM-SHA384"
1087 # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256      "ECDH-ECDSA-ARIA128-GCM-SHA256"
1088 # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384      "ECDH-ECDSA-ARIA256-GCM-SHA384"
1089 # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256       "ECDHE-ARIA128-GCM-SHA256"
1090 # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384       "ECDHE-ARIA256-GCM-SHA384"
1091 # define TLS1_TXT_ECDH_RSA_WITH_ARIA_128_GCM_SHA256        "ECDH-ARIA128-GCM-SHA256"
1092 # define TLS1_TXT_ECDH_RSA_WITH_ARIA_256_GCM_SHA384        "ECDH-ARIA256-GCM-SHA384"
1093 # define TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256             "PSK-ARIA128-GCM-SHA256"
1094 # define TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384             "PSK-ARIA256-GCM-SHA384"
1095 # define TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256         "DHE-PSK-ARIA128-GCM-SHA256"
1096 # define TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384         "DHE-PSK-ARIA256-GCM-SHA384"
1097 # define TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256         "RSA-PSK-ARIA128-GCM-SHA256"
1098 # define TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384         "RSA-PSK-ARIA256-GCM-SHA384"
1099
1100 # define TLS_CT_RSA_SIGN                 1
1101 # define TLS_CT_DSS_SIGN                 2
1102 # define TLS_CT_RSA_FIXED_DH             3
1103 # define TLS_CT_DSS_FIXED_DH             4
1104 # define TLS_CT_ECDSA_SIGN               64
1105 # define TLS_CT_RSA_FIXED_ECDH           65
1106 # define TLS_CT_ECDSA_FIXED_ECDH         66
1107 # define TLS_CT_GOST01_SIGN              22
1108 # define TLS_CT_GOST12_SIGN              238
1109 # define TLS_CT_GOST12_512_SIGN          239
1110
1111 /*
1112  * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
1113  * comment there)
1114  */
1115 # define TLS_CT_NUMBER                   10
1116
1117 # if defined(SSL3_CT_NUMBER)
1118 #  if TLS_CT_NUMBER != SSL3_CT_NUMBER
1119 #    error "SSL/TLS CT_NUMBER values do not match"
1120 #  endif
1121 # endif
1122
1123 # define TLS1_FINISH_MAC_LENGTH          12
1124
1125 # define TLS_MD_MAX_CONST_SIZE                   22
1126 # define TLS_MD_CLIENT_FINISH_CONST              "client finished"
1127 # define TLS_MD_CLIENT_FINISH_CONST_SIZE         15
1128 # define TLS_MD_SERVER_FINISH_CONST              "server finished"
1129 # define TLS_MD_SERVER_FINISH_CONST_SIZE         15
1130 # define TLS_MD_KEY_EXPANSION_CONST              "key expansion"
1131 # define TLS_MD_KEY_EXPANSION_CONST_SIZE         13
1132 # define TLS_MD_CLIENT_WRITE_KEY_CONST           "client write key"
1133 # define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE      16
1134 # define TLS_MD_SERVER_WRITE_KEY_CONST           "server write key"
1135 # define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE      16
1136 # define TLS_MD_IV_BLOCK_CONST                   "IV block"
1137 # define TLS_MD_IV_BLOCK_CONST_SIZE              8
1138 # define TLS_MD_MASTER_SECRET_CONST              "master secret"
1139 # define TLS_MD_MASTER_SECRET_CONST_SIZE         13
1140 # define TLS_MD_EXTENDED_MASTER_SECRET_CONST     "extended master secret"
1141 # define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE        22
1142
1143 # ifdef CHARSET_EBCDIC
1144 #  undef TLS_MD_CLIENT_FINISH_CONST
1145 /*
1146  * client finished
1147  */
1148 #  define TLS_MD_CLIENT_FINISH_CONST    "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
1149
1150 #  undef TLS_MD_SERVER_FINISH_CONST
1151 /*
1152  * server finished
1153  */
1154 #  define TLS_MD_SERVER_FINISH_CONST    "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
1155
1156 #  undef TLS_MD_SERVER_WRITE_KEY_CONST
1157 /*
1158  * server write key
1159  */
1160 #  define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
1161
1162 #  undef TLS_MD_KEY_EXPANSION_CONST
1163 /*
1164  * key expansion
1165  */
1166 #  define TLS_MD_KEY_EXPANSION_CONST    "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
1167
1168 #  undef TLS_MD_CLIENT_WRITE_KEY_CONST
1169 /*
1170  * client write key
1171  */
1172 #  define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
1173
1174 #  undef TLS_MD_SERVER_WRITE_KEY_CONST
1175 /*
1176  * server write key
1177  */
1178 #  define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
1179
1180 #  undef TLS_MD_IV_BLOCK_CONST
1181 /*
1182  * IV block
1183  */
1184 #  define TLS_MD_IV_BLOCK_CONST         "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
1185
1186 #  undef TLS_MD_MASTER_SECRET_CONST
1187 /*
1188  * master secret
1189  */
1190 #  define TLS_MD_MASTER_SECRET_CONST    "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
1191 #  undef TLS_MD_EXTENDED_MASTER_SECRET_CONST
1192 /*
1193  * extended master secret
1194  */
1195 #  define TLS_MD_EXTENDED_MASTER_SECRET_CONST    "\x65\x78\x74\x65\x63\x64\x65\x64\x20\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
1196 # endif
1197
1198 /* TLS Session Ticket extension struct */
1199 struct tls_session_ticket_ext_st {
1200     unsigned short length;
1201     void *data;
1202 };
1203
1204 #ifdef  __cplusplus
1205 }
1206 #endif
1207 #endif