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