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