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