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