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