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