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