Update the TLSv1.3 version indicator for draft-20
[openssl.git] / include / openssl / tls1.h
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL license (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 /* ====================================================================
11  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
12  *
13  * Portions of the attached software ("Contribution") are developed by
14  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15  *
16  * The Contribution is licensed pursuant to the OpenSSL open source
17  * license provided above.
18  *
19  * ECC cipher suite support in OpenSSL originally written by
20  * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
21  *
22  */
23 /* ====================================================================
24  * Copyright 2005 Nokia. All rights reserved.
25  *
26  * The portions of the attached software ("Contribution") is developed by
27  * Nokia Corporation and is licensed pursuant to the OpenSSL open source
28  * license.
29  *
30  * The Contribution, originally written by Mika Kousa and Pasi Eronen of
31  * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
32  * support (see RFC 4279) to OpenSSL.
33  *
34  * No patent licenses or other rights except those expressly stated in
35  * the OpenSSL open source license shall be deemed granted or received
36  * expressly, by implication, estoppel, or otherwise.
37  *
38  * No assurances are provided by Nokia that the Contribution does not
39  * infringe the patent or other intellectual property rights of any third
40  * party or that the license provides you with all the necessary rights
41  * to make use of the Contribution.
42  *
43  * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
44  * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
45  * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
46  * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
47  * OTHERWISE.
48  */
49
50 #ifndef HEADER_TLS1_H
51 # define HEADER_TLS1_H
52
53 # include <openssl/buffer.h>
54 # include <openssl/x509.h>
55
56 #ifdef  __cplusplus
57 extern "C" {
58 #endif
59
60 /* Default security level if not overridden at config time */
61 # ifndef OPENSSL_TLS_SECURITY_LEVEL
62 #  define OPENSSL_TLS_SECURITY_LEVEL 1
63 # endif
64
65 # define TLS1_VERSION                    0x0301
66 # define TLS1_1_VERSION                  0x0302
67 # define TLS1_2_VERSION                  0x0303
68 # define TLS1_3_VERSION                  0x0304
69 # define TLS_MAX_VERSION                 TLS1_3_VERSION
70
71 /* TODO(TLS1.3) REMOVE ME: Version indicator for draft -20 */
72 # define TLS1_3_VERSION_DRAFT            0x7f14
73 # define TLS1_3_VERSION_DRAFT_TXT        "TLS 1.3 (draft 20)"
74
75 /* Special value for method supporting multiple versions */
76 # define TLS_ANY_VERSION                 0x10000
77
78 # define TLS1_VERSION_MAJOR              0x03
79 # define TLS1_VERSION_MINOR              0x01
80
81 # define TLS1_1_VERSION_MAJOR            0x03
82 # define TLS1_1_VERSION_MINOR            0x02
83
84 # define TLS1_2_VERSION_MAJOR            0x03
85 # define TLS1_2_VERSION_MINOR            0x03
86
87 # define TLS1_get_version(s) \
88                 ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
89
90 # define TLS1_get_client_version(s) \
91                 ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
92
93 # define TLS1_AD_DECRYPTION_FAILED       21
94 # define TLS1_AD_RECORD_OVERFLOW         22
95 # define TLS1_AD_UNKNOWN_CA              48/* fatal */
96 # define TLS1_AD_ACCESS_DENIED           49/* fatal */
97 # define TLS1_AD_DECODE_ERROR            50/* fatal */
98 # define TLS1_AD_DECRYPT_ERROR           51
99 # define TLS1_AD_EXPORT_RESTRICTION      60/* fatal */
100 # define TLS1_AD_PROTOCOL_VERSION        70/* fatal */
101 # define TLS1_AD_INSUFFICIENT_SECURITY   71/* fatal */
102 # define TLS1_AD_INTERNAL_ERROR          80/* fatal */
103 # define TLS1_AD_INAPPROPRIATE_FALLBACK  86/* fatal */
104 # define TLS1_AD_USER_CANCELLED          90
105 # define TLS1_AD_NO_RENEGOTIATION        100
106 /* TLSv1.3 alerts */
107 # define TLS13_AD_END_OF_EARLY_DATA      1
108 # define TLS13_AD_MISSING_EXTENSION      109 /* fatal */
109 # define TLS13_AD_CERTIFICATE_REQUIRED   116 /* fatal */
110 /* codes 110-114 are from RFC3546 */
111 # define TLS1_AD_UNSUPPORTED_EXTENSION   110
112 # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
113 # define TLS1_AD_UNRECOGNIZED_NAME       112
114 # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
115 # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
116 # define TLS1_AD_UNKNOWN_PSK_IDENTITY    115/* fatal */
117 # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
118
119 /* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
120 # define TLSEXT_TYPE_server_name                 0
121 # define TLSEXT_TYPE_max_fragment_length         1
122 # define TLSEXT_TYPE_client_certificate_url      2
123 # define TLSEXT_TYPE_trusted_ca_keys             3
124 # define TLSEXT_TYPE_truncated_hmac              4
125 # define TLSEXT_TYPE_status_request              5
126 /* ExtensionType values from RFC4681 */
127 # define TLSEXT_TYPE_user_mapping                6
128 /* ExtensionType values from RFC5878 */
129 # define TLSEXT_TYPE_client_authz                7
130 # define TLSEXT_TYPE_server_authz                8
131 /* ExtensionType values from RFC6091 */
132 # define TLSEXT_TYPE_cert_type           9
133
134 /* ExtensionType values from RFC4492 */
135 /*
136  * Prior to TLSv1.3 the supported_groups extension was known as
137  * elliptic_curves
138  */
139 # define TLSEXT_TYPE_supported_groups            10
140 # define TLSEXT_TYPE_elliptic_curves             TLSEXT_TYPE_supported_groups
141 # define TLSEXT_TYPE_ec_point_formats            11
142
143
144 /* ExtensionType value from RFC5054 */
145 # define TLSEXT_TYPE_srp                         12
146
147 /* ExtensionType values from RFC5246 */
148 # define TLSEXT_TYPE_signature_algorithms        13
149
150 /* ExtensionType value from RFC5764 */
151 # define TLSEXT_TYPE_use_srtp    14
152
153 /* ExtensionType value from RFC5620 */
154 # define TLSEXT_TYPE_heartbeat   15
155
156 /* ExtensionType value from RFC7301 */
157 # define TLSEXT_TYPE_application_layer_protocol_negotiation 16
158
159 /*
160  * Extension type for Certificate Transparency
161  * https://tools.ietf.org/html/rfc6962#section-3.3.1
162  */
163 # define TLSEXT_TYPE_signed_certificate_timestamp    18
164
165 /*
166  * ExtensionType value for TLS padding extension.
167  * http://tools.ietf.org/html/draft-agl-tls-padding
168  */
169 # define TLSEXT_TYPE_padding     21
170
171 /* ExtensionType value from RFC7366 */
172 # define TLSEXT_TYPE_encrypt_then_mac    22
173
174 /* ExtensionType value from RFC7627 */
175 # define TLSEXT_TYPE_extended_master_secret      23
176
177 /* ExtensionType value from RFC4507 */
178 # define TLSEXT_TYPE_session_ticket              35
179
180 /* As defined for TLS1.3 */
181 # define TLSEXT_TYPE_key_share                   40
182 # define TLSEXT_TYPE_psk                         41
183 # define TLSEXT_TYPE_early_data                  42
184 # define TLSEXT_TYPE_supported_versions          43
185 # define TLSEXT_TYPE_cookie                      44
186 # define TLSEXT_TYPE_psk_kex_modes               45
187 # define TLSEXT_TYPE_certificate_authorities     47
188
189 /* Temporary extension type */
190 # define TLSEXT_TYPE_renegotiate                 0xff01
191
192 # ifndef OPENSSL_NO_NEXTPROTONEG
193 /* This is not an IANA defined extension number */
194 #  define TLSEXT_TYPE_next_proto_neg              13172
195 # endif
196
197 /* NameType value from RFC3546 */
198 # define TLSEXT_NAMETYPE_host_name 0
199 /* status request value from RFC3546 */
200 # define TLSEXT_STATUSTYPE_ocsp 1
201
202 /* ECPointFormat values from RFC4492 */
203 # define TLSEXT_ECPOINTFORMAT_first                      0
204 # define TLSEXT_ECPOINTFORMAT_uncompressed               0
205 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime  1
206 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2  2
207 # define TLSEXT_ECPOINTFORMAT_last                       2
208
209 /* Signature and hash algorithms from RFC5246 */
210 # define TLSEXT_signature_anonymous                      0
211 # define TLSEXT_signature_rsa                            1
212 # define TLSEXT_signature_dsa                            2
213 # define TLSEXT_signature_ecdsa                          3
214 # define TLSEXT_signature_gostr34102001                  237
215 # define TLSEXT_signature_gostr34102012_256              238
216 # define TLSEXT_signature_gostr34102012_512              239
217
218 /* Total number of different signature algorithms */
219 # define TLSEXT_signature_num                            7
220
221 # define TLSEXT_hash_none                                0
222 # define TLSEXT_hash_md5                                 1
223 # define TLSEXT_hash_sha1                                2
224 # define TLSEXT_hash_sha224                              3
225 # define TLSEXT_hash_sha256                              4
226 # define TLSEXT_hash_sha384                              5
227 # define TLSEXT_hash_sha512                              6
228 # define TLSEXT_hash_gostr3411                           237
229 # define TLSEXT_hash_gostr34112012_256                   238
230 # define TLSEXT_hash_gostr34112012_512                   239
231
232 /* Total number of different digest algorithms */
233
234 # define TLSEXT_hash_num                                 10
235
236 /* Flag set for unrecognised algorithms */
237 # define TLSEXT_nid_unknown                              0x1000000
238
239 /* ECC curves */
240
241 # define TLSEXT_curve_P_256                              23
242 # define TLSEXT_curve_P_384                              24
243
244 # define TLSEXT_MAXLEN_host_name 255
245
246 __owur const char *SSL_get_servername(const SSL *s, const int type);
247 __owur int SSL_get_servername_type(const SSL *s);
248 /*
249  * SSL_export_keying_material exports a value derived from the master secret,
250  * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
251  * optional context. (Since a zero length context is allowed, the |use_context|
252  * flag controls whether a context is included.) It returns 1 on success and
253  * zero otherwise.
254  */
255 __owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
256                                const char *label, size_t llen,
257                                const unsigned char *p, size_t plen,
258                                int use_context);
259
260 int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
261
262 int SSL_get_sigalgs(SSL *s, int idx,
263                     int *psign, int *phash, int *psignandhash,
264                     unsigned char *rsig, unsigned char *rhash);
265
266 int SSL_get_shared_sigalgs(SSL *s, int idx,
267                            int *psign, int *phash, int *psignandhash,
268                            unsigned char *rsig, unsigned char *rhash);
269
270 __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
271
272 # define SSL_set_tlsext_host_name(s,name) \
273 SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name, \
274          (char *)(name))
275
276 # define SSL_set_tlsext_debug_callback(ssl, cb) \
277 SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))(cb))
278
279 # define SSL_set_tlsext_debug_arg(ssl, arg) \
280 SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)(arg))
281
282 # define SSL_get_tlsext_status_type(ssl) \
283 SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0, NULL)
284
285 # define SSL_set_tlsext_status_type(ssl, type) \
286 SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)
287
288 # define SSL_get_tlsext_status_exts(ssl, arg) \
289 SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)(arg))
290
291 # define SSL_set_tlsext_status_exts(ssl, arg) \
292 SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)(arg))
293
294 # define SSL_get_tlsext_status_ids(ssl, arg) \
295 SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)(arg))
296
297 # define SSL_set_tlsext_status_ids(ssl, arg) \
298 SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)(arg))
299
300 # define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
301 SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)(arg))
302
303 # define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
304 SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)(arg))
305
306 # define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
307 SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB, \
308                       (void (*)(void))(cb))
309
310 # define SSL_TLSEXT_ERR_OK 0
311 # define SSL_TLSEXT_ERR_ALERT_WARNING 1
312 # define SSL_TLSEXT_ERR_ALERT_FATAL 2
313 # define SSL_TLSEXT_ERR_NOACK 3
314
315 # define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
316 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)(arg))
317
318 # define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
319         SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
320 # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
321         SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
322
323 # define SSL_CTX_get_tlsext_status_cb(ssl, cb) \
324 SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0, (void (**)(void))(cb))
325 # define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
326 SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, \
327                       (void (*)(void))(cb))
328
329 # define SSL_CTX_get_tlsext_status_arg(ssl, arg) \
330 SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)(arg))
331 # define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
332 SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)(arg))
333
334 #define SSL_CTX_set_tlsext_status_type(ssl, type) \
335         SSL_CTX_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL)
336
337 #define SSL_CTX_get_tlsext_status_type(ssl) \
338         SSL_CTX_ctrl(ssl, SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE, 0, NULL)
339
340 # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
341 SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB, \
342                       (void (*)(void))(cb))
343
344 # ifndef OPENSSL_NO_HEARTBEATS
345 #  define SSL_DTLSEXT_HB_ENABLED                   0x01
346 #  define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS        0x02
347 #  define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS        0x04
348 #  define SSL_get_dtlsext_heartbeat_pending(ssl) \
349         SSL_ctrl((ssl),SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL)
350 #  define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \
351         SSL_ctrl((ssl),SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)
352
353 #  if OPENSSL_API_COMPAT < 0x10100000L
354 #   define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \
355         SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT
356 #   define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \
357         SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING
358 #   define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \
359         SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS
360 #   define SSL_TLSEXT_HB_ENABLED \
361         SSL_DTLSEXT_HB_ENABLED
362 #   define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \
363         SSL_DTLSEXT_HB_DONT_SEND_REQUESTS
364 #   define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \
365         SSL_DTLSEXT_HB_DONT_RECV_REQUESTS
366 #   define SSL_get_tlsext_heartbeat_pending(ssl) \
367         SSL_get_dtlsext_heartbeat_pending(ssl)
368 #   define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \
369         SSL_set_dtlsext_heartbeat_no_requests(ssl, arg)
370 #  endif
371 # endif
372
373 /* PSK ciphersuites from 4279 */
374 # define TLS1_CK_PSK_WITH_RC4_128_SHA                    0x0300008A
375 # define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA               0x0300008B
376 # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA                0x0300008C
377 # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA                0x0300008D
378
379 # define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA                0x0300008E
380 # define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA           0x0300008F
381 # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA            0x03000090
382 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA            0x03000091
383
384 # define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA                0x03000092
385 # define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA           0x03000093
386 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA            0x03000094
387 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA            0x03000095
388
389 /* PSK ciphersuites from 5487 */
390 # define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256             0x030000A8
391 # define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384             0x030000A9
392 # define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256         0x030000AA
393 # define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384         0x030000AB
394 # define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256         0x030000AC
395 # define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384         0x030000AD
396
397 # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256             0x030000AE
398 # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384             0x030000AF
399 # define TLS1_CK_PSK_WITH_NULL_SHA256                    0x030000B0
400 # define TLS1_CK_PSK_WITH_NULL_SHA384                    0x030000B1
401
402 # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256         0x030000B2
403 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384         0x030000B3
404 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA256                0x030000B4
405 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA384                0x030000B5
406
407 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256         0x030000B6
408 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384         0x030000B7
409 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA256                0x030000B8
410 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA384                0x030000B9
411
412 /* NULL PSK ciphersuites from RFC4785 */
413 # define TLS1_CK_PSK_WITH_NULL_SHA                       0x0300002C
414 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA                   0x0300002D
415 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA                   0x0300002E
416
417 /* AES ciphersuites from RFC3268 */
418 # define TLS1_CK_RSA_WITH_AES_128_SHA                    0x0300002F
419 # define TLS1_CK_DH_DSS_WITH_AES_128_SHA                 0x03000030
420 # define TLS1_CK_DH_RSA_WITH_AES_128_SHA                 0x03000031
421 # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA                0x03000032
422 # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA                0x03000033
423 # define TLS1_CK_ADH_WITH_AES_128_SHA                    0x03000034
424
425 # define TLS1_CK_RSA_WITH_AES_256_SHA                    0x03000035
426 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA                 0x03000036
427 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA                 0x03000037
428 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA                0x03000038
429 # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA                0x03000039
430 # define TLS1_CK_ADH_WITH_AES_256_SHA                    0x0300003A
431
432 /* TLS v1.2 ciphersuites */
433 # define TLS1_CK_RSA_WITH_NULL_SHA256                    0x0300003B
434 # define TLS1_CK_RSA_WITH_AES_128_SHA256                 0x0300003C
435 # define TLS1_CK_RSA_WITH_AES_256_SHA256                 0x0300003D
436 # define TLS1_CK_DH_DSS_WITH_AES_128_SHA256              0x0300003E
437 # define TLS1_CK_DH_RSA_WITH_AES_128_SHA256              0x0300003F
438 # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256             0x03000040
439
440 /* Camellia ciphersuites from RFC4132 */
441 # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA           0x03000041
442 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA        0x03000042
443 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA        0x03000043
444 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA       0x03000044
445 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA       0x03000045
446 # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA           0x03000046
447
448 /* TLS v1.2 ciphersuites */
449 # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256             0x03000067
450 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA256              0x03000068
451 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA256              0x03000069
452 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256             0x0300006A
453 # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256             0x0300006B
454 # define TLS1_CK_ADH_WITH_AES_128_SHA256                 0x0300006C
455 # define TLS1_CK_ADH_WITH_AES_256_SHA256                 0x0300006D
456
457 /* Camellia ciphersuites from RFC4132 */
458 # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA           0x03000084
459 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA        0x03000085
460 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA        0x03000086
461 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA       0x03000087
462 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA       0x03000088
463 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA           0x03000089
464
465 /* SEED ciphersuites from RFC4162 */
466 # define TLS1_CK_RSA_WITH_SEED_SHA                       0x03000096
467 # define TLS1_CK_DH_DSS_WITH_SEED_SHA                    0x03000097
468 # define TLS1_CK_DH_RSA_WITH_SEED_SHA                    0x03000098
469 # define TLS1_CK_DHE_DSS_WITH_SEED_SHA                   0x03000099
470 # define TLS1_CK_DHE_RSA_WITH_SEED_SHA                   0x0300009A
471 # define TLS1_CK_ADH_WITH_SEED_SHA                       0x0300009B
472
473 /* TLS v1.2 GCM ciphersuites from RFC5288 */
474 # define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256             0x0300009C
475 # define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384             0x0300009D
476 # define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256         0x0300009E
477 # define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384         0x0300009F
478 # define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256          0x030000A0
479 # define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384          0x030000A1
480 # define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256         0x030000A2
481 # define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384         0x030000A3
482 # define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256          0x030000A4
483 # define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384          0x030000A5
484 # define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256             0x030000A6
485 # define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384             0x030000A7
486
487 /* CCM ciphersuites from RFC6655 */
488 # define TLS1_CK_RSA_WITH_AES_128_CCM                    0x0300C09C
489 # define TLS1_CK_RSA_WITH_AES_256_CCM                    0x0300C09D
490 # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM                0x0300C09E
491 # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM                0x0300C09F
492 # define TLS1_CK_RSA_WITH_AES_128_CCM_8                  0x0300C0A0
493 # define TLS1_CK_RSA_WITH_AES_256_CCM_8                  0x0300C0A1
494 # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8              0x0300C0A2
495 # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8              0x0300C0A3
496 # define TLS1_CK_PSK_WITH_AES_128_CCM                    0x0300C0A4
497 # define TLS1_CK_PSK_WITH_AES_256_CCM                    0x0300C0A5
498 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM                0x0300C0A6
499 # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM                0x0300C0A7
500 # define TLS1_CK_PSK_WITH_AES_128_CCM_8                  0x0300C0A8
501 # define TLS1_CK_PSK_WITH_AES_256_CCM_8                  0x0300C0A9
502 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8              0x0300C0AA
503 # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8              0x0300C0AB
504
505 /* CCM ciphersuites from RFC7251 */
506 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM            0x0300C0AC
507 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM            0x0300C0AD
508 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8          0x0300C0AE
509 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8          0x0300C0AF
510
511 /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
512 # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256                0x030000BA
513 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256             0x030000BB
514 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256             0x030000BC
515 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256            0x030000BD
516 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256            0x030000BE
517 # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256                0x030000BF
518
519 # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256                0x030000C0
520 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256             0x030000C1
521 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256             0x030000C2
522 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256            0x030000C3
523 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256            0x030000C4
524 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256                0x030000C5
525
526 /* ECC ciphersuites from RFC4492 */
527 # define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA                0x0300C001
528 # define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA             0x0300C002
529 # define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA        0x0300C003
530 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA         0x0300C004
531 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA         0x0300C005
532
533 # define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA               0x0300C006
534 # define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA            0x0300C007
535 # define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA       0x0300C008
536 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA        0x0300C009
537 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA        0x0300C00A
538
539 # define TLS1_CK_ECDH_RSA_WITH_NULL_SHA                  0x0300C00B
540 # define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA               0x0300C00C
541 # define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA          0x0300C00D
542 # define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA           0x0300C00E
543 # define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA           0x0300C00F
544
545 # define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA                 0x0300C010
546 # define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA              0x0300C011
547 # define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA         0x0300C012
548 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA          0x0300C013
549 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA          0x0300C014
550
551 # define TLS1_CK_ECDH_anon_WITH_NULL_SHA                 0x0300C015
552 # define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA              0x0300C016
553 # define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA         0x0300C017
554 # define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA          0x0300C018
555 # define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA          0x0300C019
556
557 /* SRP ciphersuites from RFC 5054 */
558 # define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA           0x0300C01A
559 # define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA       0x0300C01B
560 # define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA       0x0300C01C
561 # define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA            0x0300C01D
562 # define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA        0x0300C01E
563 # define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA        0x0300C01F
564 # define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA            0x0300C020
565 # define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA        0x0300C021
566 # define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA        0x0300C022
567
568 /* ECDH HMAC based ciphersuites from RFC5289 */
569
570 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256         0x0300C023
571 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384         0x0300C024
572 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256          0x0300C025
573 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384          0x0300C026
574 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256           0x0300C027
575 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384           0x0300C028
576 # define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256            0x0300C029
577 # define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384            0x0300C02A
578
579 /* ECDH GCM based ciphersuites from RFC5289 */
580 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256     0x0300C02B
581 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384     0x0300C02C
582 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256      0x0300C02D
583 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384      0x0300C02E
584 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256       0x0300C02F
585 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384       0x0300C030
586 # define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256        0x0300C031
587 # define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384        0x0300C032
588
589 /* ECDHE PSK ciphersuites from RFC5489 */
590 # define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA              0x0300C033
591 # define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA         0x0300C034
592 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA          0x0300C035
593 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA          0x0300C036
594
595 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256       0x0300C037
596 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384       0x0300C038
597
598 /* NULL PSK ciphersuites from RFC4785 */
599
600 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA                 0x0300C039
601 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256              0x0300C03A
602 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384              0x0300C03B
603
604 /* Camellia-CBC ciphersuites from RFC6367 */
605 # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072
606 # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073
607 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256  0x0300C074
608 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384  0x0300C075
609 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   0x0300C076
610 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384   0x0300C077
611 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256    0x0300C078
612 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384    0x0300C079
613
614 # define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256         0x0300C094
615 # define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384         0x0300C095
616 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256     0x0300C096
617 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384     0x0300C097
618 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256     0x0300C098
619 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384     0x0300C099
620 # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256   0x0300C09A
621 # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384   0x0300C09B
622
623 /* draft-ietf-tls-chacha20-poly1305-03 */
624 # define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305         0x0300CCA8
625 # define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305       0x0300CCA9
626 # define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305           0x0300CCAA
627 # define TLS1_CK_PSK_WITH_CHACHA20_POLY1305               0x0300CCAB
628 # define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305         0x0300CCAC
629 # define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305           0x0300CCAD
630 # define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305           0x0300CCAE
631
632 /* TLS v1.3 ciphersuites */
633 # define TLS1_3_CK_AES_128_GCM_SHA256                     0x03001301
634 # define TLS1_3_CK_AES_256_GCM_SHA384                     0x03001302
635 # define TLS1_3_CK_CHACHA20_POLY1305_SHA256               0x03001303
636 # define TLS1_3_CK_AES_128_CCM_SHA256                     0x03001304
637 # define TLS1_3_CK_AES_128_CCM_8_SHA256                   0x03001305
638
639 /*
640  * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE
641  * ciphers names with "EDH" instead of "DHE".  Going forward, we should be
642  * using DHE everywhere, though we may indefinitely maintain aliases for
643  * users or configurations that used "EDH"
644  */
645 # define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA               "DHE-DSS-RC4-SHA"
646
647 # define TLS1_TXT_PSK_WITH_NULL_SHA                      "PSK-NULL-SHA"
648 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA                  "DHE-PSK-NULL-SHA"
649 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA                  "RSA-PSK-NULL-SHA"
650
651 /* AES ciphersuites from RFC3268 */
652 # define TLS1_TXT_RSA_WITH_AES_128_SHA                   "AES128-SHA"
653 # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA                "DH-DSS-AES128-SHA"
654 # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA                "DH-RSA-AES128-SHA"
655 # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA               "DHE-DSS-AES128-SHA"
656 # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA               "DHE-RSA-AES128-SHA"
657 # define TLS1_TXT_ADH_WITH_AES_128_SHA                   "ADH-AES128-SHA"
658
659 # define TLS1_TXT_RSA_WITH_AES_256_SHA                   "AES256-SHA"
660 # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA                "DH-DSS-AES256-SHA"
661 # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA                "DH-RSA-AES256-SHA"
662 # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA               "DHE-DSS-AES256-SHA"
663 # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA               "DHE-RSA-AES256-SHA"
664 # define TLS1_TXT_ADH_WITH_AES_256_SHA                   "ADH-AES256-SHA"
665
666 /* ECC ciphersuites from RFC4492 */
667 # define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA               "ECDH-ECDSA-NULL-SHA"
668 # define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA            "ECDH-ECDSA-RC4-SHA"
669 # define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA       "ECDH-ECDSA-DES-CBC3-SHA"
670 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA        "ECDH-ECDSA-AES128-SHA"
671 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA        "ECDH-ECDSA-AES256-SHA"
672
673 # define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA              "ECDHE-ECDSA-NULL-SHA"
674 # define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA           "ECDHE-ECDSA-RC4-SHA"
675 # define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      "ECDHE-ECDSA-DES-CBC3-SHA"
676 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       "ECDHE-ECDSA-AES128-SHA"
677 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       "ECDHE-ECDSA-AES256-SHA"
678
679 # define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA                 "ECDH-RSA-NULL-SHA"
680 # define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA              "ECDH-RSA-RC4-SHA"
681 # define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA         "ECDH-RSA-DES-CBC3-SHA"
682 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA          "ECDH-RSA-AES128-SHA"
683 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA          "ECDH-RSA-AES256-SHA"
684
685 # define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA                "ECDHE-RSA-NULL-SHA"
686 # define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA             "ECDHE-RSA-RC4-SHA"
687 # define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA        "ECDHE-RSA-DES-CBC3-SHA"
688 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA         "ECDHE-RSA-AES128-SHA"
689 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA         "ECDHE-RSA-AES256-SHA"
690
691 # define TLS1_TXT_ECDH_anon_WITH_NULL_SHA                "AECDH-NULL-SHA"
692 # define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA             "AECDH-RC4-SHA"
693 # define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA        "AECDH-DES-CBC3-SHA"
694 # define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA         "AECDH-AES128-SHA"
695 # define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA         "AECDH-AES256-SHA"
696
697 /* PSK ciphersuites from RFC 4279 */
698 # define TLS1_TXT_PSK_WITH_RC4_128_SHA                   "PSK-RC4-SHA"
699 # define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA              "PSK-3DES-EDE-CBC-SHA"
700 # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA               "PSK-AES128-CBC-SHA"
701 # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA               "PSK-AES256-CBC-SHA"
702
703 # define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA               "DHE-PSK-RC4-SHA"
704 # define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA          "DHE-PSK-3DES-EDE-CBC-SHA"
705 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA           "DHE-PSK-AES128-CBC-SHA"
706 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA           "DHE-PSK-AES256-CBC-SHA"
707 # define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA               "RSA-PSK-RC4-SHA"
708 # define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA          "RSA-PSK-3DES-EDE-CBC-SHA"
709 # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA           "RSA-PSK-AES128-CBC-SHA"
710 # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA           "RSA-PSK-AES256-CBC-SHA"
711
712 /* PSK ciphersuites from RFC 5487 */
713 # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256            "PSK-AES128-GCM-SHA256"
714 # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384            "PSK-AES256-GCM-SHA384"
715 # define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256        "DHE-PSK-AES128-GCM-SHA256"
716 # define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384        "DHE-PSK-AES256-GCM-SHA384"
717 # define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256        "RSA-PSK-AES128-GCM-SHA256"
718 # define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384        "RSA-PSK-AES256-GCM-SHA384"
719
720 # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256            "PSK-AES128-CBC-SHA256"
721 # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384            "PSK-AES256-CBC-SHA384"
722 # define TLS1_TXT_PSK_WITH_NULL_SHA256                   "PSK-NULL-SHA256"
723 # define TLS1_TXT_PSK_WITH_NULL_SHA384                   "PSK-NULL-SHA384"
724
725 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256        "DHE-PSK-AES128-CBC-SHA256"
726 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384        "DHE-PSK-AES256-CBC-SHA384"
727 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256               "DHE-PSK-NULL-SHA256"
728 # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384               "DHE-PSK-NULL-SHA384"
729
730 # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256        "RSA-PSK-AES128-CBC-SHA256"
731 # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384        "RSA-PSK-AES256-CBC-SHA384"
732 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256               "RSA-PSK-NULL-SHA256"
733 # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384               "RSA-PSK-NULL-SHA384"
734
735 /* SRP ciphersuite from RFC 5054 */
736 # define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA          "SRP-3DES-EDE-CBC-SHA"
737 # define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA      "SRP-RSA-3DES-EDE-CBC-SHA"
738 # define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA      "SRP-DSS-3DES-EDE-CBC-SHA"
739 # define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA           "SRP-AES-128-CBC-SHA"
740 # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA       "SRP-RSA-AES-128-CBC-SHA"
741 # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA       "SRP-DSS-AES-128-CBC-SHA"
742 # define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA           "SRP-AES-256-CBC-SHA"
743 # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA       "SRP-RSA-AES-256-CBC-SHA"
744 # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA       "SRP-DSS-AES-256-CBC-SHA"
745
746 /* Camellia ciphersuites from RFC4132 */
747 # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA          "CAMELLIA128-SHA"
748 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA       "DH-DSS-CAMELLIA128-SHA"
749 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA       "DH-RSA-CAMELLIA128-SHA"
750 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA      "DHE-DSS-CAMELLIA128-SHA"
751 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA      "DHE-RSA-CAMELLIA128-SHA"
752 # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA          "ADH-CAMELLIA128-SHA"
753
754 # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA          "CAMELLIA256-SHA"
755 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA       "DH-DSS-CAMELLIA256-SHA"
756 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA       "DH-RSA-CAMELLIA256-SHA"
757 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA      "DHE-DSS-CAMELLIA256-SHA"
758 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA      "DHE-RSA-CAMELLIA256-SHA"
759 # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA          "ADH-CAMELLIA256-SHA"
760
761 /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
762 # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256               "CAMELLIA128-SHA256"
763 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256            "DH-DSS-CAMELLIA128-SHA256"
764 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256            "DH-RSA-CAMELLIA128-SHA256"
765 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256           "DHE-DSS-CAMELLIA128-SHA256"
766 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256           "DHE-RSA-CAMELLIA128-SHA256"
767 # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256               "ADH-CAMELLIA128-SHA256"
768
769 # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256               "CAMELLIA256-SHA256"
770 # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256            "DH-DSS-CAMELLIA256-SHA256"
771 # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256            "DH-RSA-CAMELLIA256-SHA256"
772 # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256           "DHE-DSS-CAMELLIA256-SHA256"
773 # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256           "DHE-RSA-CAMELLIA256-SHA256"
774 # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256               "ADH-CAMELLIA256-SHA256"
775
776 # define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256               "PSK-CAMELLIA128-SHA256"
777 # define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384               "PSK-CAMELLIA256-SHA384"
778 # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256           "DHE-PSK-CAMELLIA128-SHA256"
779 # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384           "DHE-PSK-CAMELLIA256-SHA384"
780 # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256           "RSA-PSK-CAMELLIA128-SHA256"
781 # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384           "RSA-PSK-CAMELLIA256-SHA384"
782 # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256         "ECDHE-PSK-CAMELLIA128-SHA256"
783 # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384         "ECDHE-PSK-CAMELLIA256-SHA384"
784
785 /* SEED ciphersuites from RFC4162 */
786 # define TLS1_TXT_RSA_WITH_SEED_SHA                      "SEED-SHA"
787 # define TLS1_TXT_DH_DSS_WITH_SEED_SHA                   "DH-DSS-SEED-SHA"
788 # define TLS1_TXT_DH_RSA_WITH_SEED_SHA                   "DH-RSA-SEED-SHA"
789 # define TLS1_TXT_DHE_DSS_WITH_SEED_SHA                  "DHE-DSS-SEED-SHA"
790 # define TLS1_TXT_DHE_RSA_WITH_SEED_SHA                  "DHE-RSA-SEED-SHA"
791 # define TLS1_TXT_ADH_WITH_SEED_SHA                      "ADH-SEED-SHA"
792
793 /* TLS v1.2 ciphersuites */
794 # define TLS1_TXT_RSA_WITH_NULL_SHA256                   "NULL-SHA256"
795 # define TLS1_TXT_RSA_WITH_AES_128_SHA256                "AES128-SHA256"
796 # define TLS1_TXT_RSA_WITH_AES_256_SHA256                "AES256-SHA256"
797 # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256             "DH-DSS-AES128-SHA256"
798 # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256             "DH-RSA-AES128-SHA256"
799 # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256            "DHE-DSS-AES128-SHA256"
800 # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256            "DHE-RSA-AES128-SHA256"
801 # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256             "DH-DSS-AES256-SHA256"
802 # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256             "DH-RSA-AES256-SHA256"
803 # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256            "DHE-DSS-AES256-SHA256"
804 # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256            "DHE-RSA-AES256-SHA256"
805 # define TLS1_TXT_ADH_WITH_AES_128_SHA256                "ADH-AES128-SHA256"
806 # define TLS1_TXT_ADH_WITH_AES_256_SHA256                "ADH-AES256-SHA256"
807
808 /* TLS v1.2 GCM ciphersuites from RFC5288 */
809 # define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256            "AES128-GCM-SHA256"
810 # define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384            "AES256-GCM-SHA384"
811 # define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256        "DHE-RSA-AES128-GCM-SHA256"
812 # define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384        "DHE-RSA-AES256-GCM-SHA384"
813 # define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256         "DH-RSA-AES128-GCM-SHA256"
814 # define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384         "DH-RSA-AES256-GCM-SHA384"
815 # define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256        "DHE-DSS-AES128-GCM-SHA256"
816 # define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384        "DHE-DSS-AES256-GCM-SHA384"
817 # define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256         "DH-DSS-AES128-GCM-SHA256"
818 # define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384         "DH-DSS-AES256-GCM-SHA384"
819 # define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256            "ADH-AES128-GCM-SHA256"
820 # define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384            "ADH-AES256-GCM-SHA384"
821
822 /* CCM ciphersuites from RFC6655 */
823
824 # define TLS1_TXT_RSA_WITH_AES_128_CCM                   "AES128-CCM"
825 # define TLS1_TXT_RSA_WITH_AES_256_CCM                   "AES256-CCM"
826 # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM               "DHE-RSA-AES128-CCM"
827 # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM               "DHE-RSA-AES256-CCM"
828
829 # define TLS1_TXT_RSA_WITH_AES_128_CCM_8                 "AES128-CCM8"
830 # define TLS1_TXT_RSA_WITH_AES_256_CCM_8                 "AES256-CCM8"
831 # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8             "DHE-RSA-AES128-CCM8"
832 # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8             "DHE-RSA-AES256-CCM8"
833
834 # define TLS1_TXT_PSK_WITH_AES_128_CCM                   "PSK-AES128-CCM"
835 # define TLS1_TXT_PSK_WITH_AES_256_CCM                   "PSK-AES256-CCM"
836 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM               "DHE-PSK-AES128-CCM"
837 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM               "DHE-PSK-AES256-CCM"
838
839 # define TLS1_TXT_PSK_WITH_AES_128_CCM_8                 "PSK-AES128-CCM8"
840 # define TLS1_TXT_PSK_WITH_AES_256_CCM_8                 "PSK-AES256-CCM8"
841 # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8             "DHE-PSK-AES128-CCM8"
842 # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8             "DHE-PSK-AES256-CCM8"
843
844 /* CCM ciphersuites from RFC7251 */
845
846 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM       "ECDHE-ECDSA-AES128-CCM"
847 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM       "ECDHE-ECDSA-AES256-CCM"
848 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8     "ECDHE-ECDSA-AES128-CCM8"
849 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8     "ECDHE-ECDSA-AES256-CCM8"
850
851 /* ECDH HMAC based ciphersuites from RFC5289 */
852
853 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256    "ECDHE-ECDSA-AES128-SHA256"
854 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384    "ECDHE-ECDSA-AES256-SHA384"
855 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256     "ECDH-ECDSA-AES128-SHA256"
856 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384     "ECDH-ECDSA-AES256-SHA384"
857 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256      "ECDHE-RSA-AES128-SHA256"
858 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384      "ECDHE-RSA-AES256-SHA384"
859 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256       "ECDH-RSA-AES128-SHA256"
860 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384       "ECDH-RSA-AES256-SHA384"
861
862 /* ECDH GCM based ciphersuites from RFC5289 */
863 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256    "ECDHE-ECDSA-AES128-GCM-SHA256"
864 # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384    "ECDHE-ECDSA-AES256-GCM-SHA384"
865 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256     "ECDH-ECDSA-AES128-GCM-SHA256"
866 # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384     "ECDH-ECDSA-AES256-GCM-SHA384"
867 # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256      "ECDHE-RSA-AES128-GCM-SHA256"
868 # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384      "ECDHE-RSA-AES256-GCM-SHA384"
869 # define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256       "ECDH-RSA-AES128-GCM-SHA256"
870 # define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384       "ECDH-RSA-AES256-GCM-SHA384"
871
872 /* TLS v1.2 PSK GCM ciphersuites from RFC5487 */
873 # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256            "PSK-AES128-GCM-SHA256"
874 # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384            "PSK-AES256-GCM-SHA384"
875
876 /* ECDHE PSK ciphersuites from RFC 5489 */
877 # define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA               "ECDHE-PSK-RC4-SHA"
878 # define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA          "ECDHE-PSK-3DES-EDE-CBC-SHA"
879 # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA           "ECDHE-PSK-AES128-CBC-SHA"
880 # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA           "ECDHE-PSK-AES256-CBC-SHA"
881
882 # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256        "ECDHE-PSK-AES128-CBC-SHA256"
883 # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384        "ECDHE-PSK-AES256-CBC-SHA384"
884
885 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA                  "ECDHE-PSK-NULL-SHA"
886 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256               "ECDHE-PSK-NULL-SHA256"
887 # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384               "ECDHE-PSK-NULL-SHA384"
888
889 /* Camellia-CBC ciphersuites from RFC6367 */
890 # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256"
891 # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384"
892 # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256  "ECDH-ECDSA-CAMELLIA128-SHA256"
893 # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384  "ECDH-ECDSA-CAMELLIA256-SHA384"
894 # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   "ECDHE-RSA-CAMELLIA128-SHA256"
895 # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384   "ECDHE-RSA-CAMELLIA256-SHA384"
896 # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256    "ECDH-RSA-CAMELLIA128-SHA256"
897 # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384    "ECDH-RSA-CAMELLIA256-SHA384"
898
899 /* draft-ietf-tls-chacha20-poly1305-03 */
900 # define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305         "ECDHE-RSA-CHACHA20-POLY1305"
901 # define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305       "ECDHE-ECDSA-CHACHA20-POLY1305"
902 # define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305           "DHE-RSA-CHACHA20-POLY1305"
903 # define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305               "PSK-CHACHA20-POLY1305"
904 # define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305         "ECDHE-PSK-CHACHA20-POLY1305"
905 # define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305           "DHE-PSK-CHACHA20-POLY1305"
906 # define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305           "RSA-PSK-CHACHA20-POLY1305"
907
908 /* TLSv1.3 ciphersuites */
909 /*
910  * TODO(TLS1.3): Review the naming scheme for TLSv1.3 ciphers and also the
911  * cipherstring selection process for these ciphers
912  */
913 # define TLS1_3_TXT_AES_128_GCM_SHA256                     "TLS13-AES-128-GCM-SHA256"
914 # define TLS1_3_TXT_AES_256_GCM_SHA384                     "TLS13-AES-256-GCM-SHA384"
915 # define TLS1_3_TXT_CHACHA20_POLY1305_SHA256               "TLS13-CHACHA20-POLY1305-SHA256"
916 # define TLS1_3_TXT_AES_128_CCM_SHA256                     "TLS13-AES-128-CCM-SHA256"
917 # define TLS1_3_TXT_AES_128_CCM_8_SHA256                   "TLS13-AES-128-CCM-8-SHA256"
918
919 # define TLS_CT_RSA_SIGN                 1
920 # define TLS_CT_DSS_SIGN                 2
921 # define TLS_CT_RSA_FIXED_DH             3
922 # define TLS_CT_DSS_FIXED_DH             4
923 # define TLS_CT_ECDSA_SIGN               64
924 # define TLS_CT_RSA_FIXED_ECDH           65
925 # define TLS_CT_ECDSA_FIXED_ECDH         66
926 # define TLS_CT_GOST01_SIGN              22
927 # define TLS_CT_GOST12_SIGN              238
928 # define TLS_CT_GOST12_512_SIGN          239
929
930 /*
931  * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
932  * comment there)
933  */
934 # define TLS_CT_NUMBER                   9
935
936 # define TLS1_FINISH_MAC_LENGTH          12
937
938 # define TLS_MD_MAX_CONST_SIZE                   22
939 # define TLS_MD_CLIENT_FINISH_CONST              "client finished"
940 # define TLS_MD_CLIENT_FINISH_CONST_SIZE         15
941 # define TLS_MD_SERVER_FINISH_CONST              "server finished"
942 # define TLS_MD_SERVER_FINISH_CONST_SIZE         15
943 # define TLS_MD_KEY_EXPANSION_CONST              "key expansion"
944 # define TLS_MD_KEY_EXPANSION_CONST_SIZE         13
945 # define TLS_MD_CLIENT_WRITE_KEY_CONST           "client write key"
946 # define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE      16
947 # define TLS_MD_SERVER_WRITE_KEY_CONST           "server write key"
948 # define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE      16
949 # define TLS_MD_IV_BLOCK_CONST                   "IV block"
950 # define TLS_MD_IV_BLOCK_CONST_SIZE              8
951 # define TLS_MD_MASTER_SECRET_CONST              "master secret"
952 # define TLS_MD_MASTER_SECRET_CONST_SIZE         13
953 # define TLS_MD_EXTENDED_MASTER_SECRET_CONST     "extended master secret"
954 # define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE        22
955
956 # ifdef CHARSET_EBCDIC
957 #  undef TLS_MD_CLIENT_FINISH_CONST
958 /*
959  * client finished
960  */
961 #  define TLS_MD_CLIENT_FINISH_CONST    "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
962
963 #  undef TLS_MD_SERVER_FINISH_CONST
964 /*
965  * server finished
966  */
967 #  define TLS_MD_SERVER_FINISH_CONST    "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
968
969 #  undef TLS_MD_SERVER_WRITE_KEY_CONST
970 /*
971  * server write key
972  */
973 #  define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
974
975 #  undef TLS_MD_KEY_EXPANSION_CONST
976 /*
977  * key expansion
978  */
979 #  define TLS_MD_KEY_EXPANSION_CONST    "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
980
981 #  undef TLS_MD_CLIENT_WRITE_KEY_CONST
982 /*
983  * client write key
984  */
985 #  define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
986
987 #  undef TLS_MD_SERVER_WRITE_KEY_CONST
988 /*
989  * server write key
990  */
991 #  define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
992
993 #  undef TLS_MD_IV_BLOCK_CONST
994 /*
995  * IV block
996  */
997 #  define TLS_MD_IV_BLOCK_CONST         "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
998
999 #  undef TLS_MD_MASTER_SECRET_CONST
1000 /*
1001  * master secret
1002  */
1003 #  define TLS_MD_MASTER_SECRET_CONST    "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
1004 #  undef TLS_MD_EXTENDED_MASTER_SECRET_CONST
1005 /*
1006  * extended master secret
1007  */
1008 #  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"
1009 # endif
1010
1011 /* TLS Session Ticket extension struct */
1012 struct tls_session_ticket_ext_st {
1013     unsigned short length;
1014     void *data;
1015 };
1016
1017 #ifdef  __cplusplus
1018 }
1019 #endif
1020 #endif