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