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

source code of include/openssl/tls1.h