diff options
Diffstat (limited to 'src/lib/libssl/tls1.h')
-rw-r--r-- | src/lib/libssl/tls1.h | 147 |
1 files changed, 11 insertions, 136 deletions
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index b3cc8f098b..2d1d293e1a 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
@@ -56,59 +56,6 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | /* ==================================================================== | 58 | /* ==================================================================== |
59 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | ||
60 | * | ||
61 | * Redistribution and use in source and binary forms, with or without | ||
62 | * modification, are permitted provided that the following conditions | ||
63 | * are met: | ||
64 | * | ||
65 | * 1. Redistributions of source code must retain the above copyright | ||
66 | * notice, this list of conditions and the following disclaimer. | ||
67 | * | ||
68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
69 | * notice, this list of conditions and the following disclaimer in | ||
70 | * the documentation and/or other materials provided with the | ||
71 | * distribution. | ||
72 | * | ||
73 | * 3. All advertising materials mentioning features or use of this | ||
74 | * software must display the following acknowledgment: | ||
75 | * "This product includes software developed by the OpenSSL Project | ||
76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
77 | * | ||
78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
79 | * endorse or promote products derived from this software without | ||
80 | * prior written permission. For written permission, please contact | ||
81 | * openssl-core@openssl.org. | ||
82 | * | ||
83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
84 | * nor may "OpenSSL" appear in their names without prior written | ||
85 | * permission of the OpenSSL Project. | ||
86 | * | ||
87 | * 6. Redistributions of any form whatsoever must retain the following | ||
88 | * acknowledgment: | ||
89 | * "This product includes software developed by the OpenSSL Project | ||
90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
91 | * | ||
92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
104 | * ==================================================================== | ||
105 | * | ||
106 | * This product includes cryptographic software written by Eric Young | ||
107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
108 | * Hudson (tjh@cryptsoft.com). | ||
109 | * | ||
110 | */ | ||
111 | /* ==================================================================== | ||
112 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 59 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
113 | * | 60 | * |
114 | * Portions of the attached software ("Contribution") are developed by | 61 | * Portions of the attached software ("Contribution") are developed by |
@@ -121,32 +68,6 @@ | |||
121 | * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. | 68 | * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. |
122 | * | 69 | * |
123 | */ | 70 | */ |
124 | /* ==================================================================== | ||
125 | * Copyright 2005 Nokia. All rights reserved. | ||
126 | * | ||
127 | * The portions of the attached software ("Contribution") is developed by | ||
128 | * Nokia Corporation and is licensed pursuant to the OpenSSL open source | ||
129 | * license. | ||
130 | * | ||
131 | * The Contribution, originally written by Mika Kousa and Pasi Eronen of | ||
132 | * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites | ||
133 | * support (see RFC 4279) to OpenSSL. | ||
134 | * | ||
135 | * No patent licenses or other rights except those expressly stated in | ||
136 | * the OpenSSL open source license shall be deemed granted or received | ||
137 | * expressly, by implication, estoppel, or otherwise. | ||
138 | * | ||
139 | * No assurances are provided by Nokia that the Contribution does not | ||
140 | * infringe the patent or other intellectual property rights of any third | ||
141 | * party or that the license provides you with all the necessary rights | ||
142 | * to make use of the Contribution. | ||
143 | * | ||
144 | * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN | ||
145 | * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA | ||
146 | * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY | ||
147 | * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR | ||
148 | * OTHERWISE. | ||
149 | */ | ||
150 | 71 | ||
151 | #ifndef HEADER_TLS1_H | 72 | #ifndef HEADER_TLS1_H |
152 | #define HEADER_TLS1_H | 73 | #define HEADER_TLS1_H |
@@ -183,39 +104,22 @@ extern "C" { | |||
183 | #define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 | 104 | #define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 |
184 | #define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ | 105 | #define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ |
185 | 106 | ||
186 | /* ExtensionType values from RFC3546 / RFC4366 */ | 107 | /* ExtensionType values from RFC 3546 */ |
187 | #define TLSEXT_TYPE_server_name 0 | 108 | #define TLSEXT_TYPE_server_name 0 |
188 | #define TLSEXT_TYPE_max_fragment_length 1 | 109 | #define TLSEXT_TYPE_max_fragment_length 1 |
189 | #define TLSEXT_TYPE_client_certificate_url 2 | 110 | #define TLSEXT_TYPE_client_certificate_url 2 |
190 | #define TLSEXT_TYPE_trusted_ca_keys 3 | 111 | #define TLSEXT_TYPE_trusted_ca_keys 3 |
191 | #define TLSEXT_TYPE_truncated_hmac 4 | 112 | #define TLSEXT_TYPE_truncated_hmac 4 |
192 | #define TLSEXT_TYPE_status_request 5 | 113 | #define TLSEXT_TYPE_status_request 5 |
193 | /* ExtensionType values from RFC4492 */ | ||
194 | #define TLSEXT_TYPE_elliptic_curves 10 | 114 | #define TLSEXT_TYPE_elliptic_curves 10 |
195 | #define TLSEXT_TYPE_ec_point_formats 11 | 115 | #define TLSEXT_TYPE_ec_point_formats 11 |
196 | #define TLSEXT_TYPE_session_ticket 35 | 116 | #define TLSEXT_TYPE_session_ticket 35 |
197 | /* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */ | ||
198 | #if 0 /* will have to be provided externally for now , | ||
199 | * i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183 | ||
200 | * using whatever extension number you'd like to try */ | ||
201 | # define TLSEXT_TYPE_opaque_prf_input ?? */ | ||
202 | #endif | ||
203 | |||
204 | /* Temporary extension type */ | ||
205 | #define TLSEXT_TYPE_renegotiate 0xff01 | ||
206 | 117 | ||
207 | /* NameType value from RFC 3546 */ | 118 | /* NameType value from RFC 3546 */ |
208 | #define TLSEXT_NAMETYPE_host_name 0 | 119 | #define TLSEXT_NAMETYPE_host_name 0 |
209 | /* status request value from RFC 3546 */ | 120 | /* status request value from RFC 3546 */ |
210 | #define TLSEXT_STATUSTYPE_ocsp 1 | 121 | #define TLSEXT_STATUSTYPE_ocsp 1 |
211 | 122 | ||
212 | /* ECPointFormat values from draft-ietf-tls-ecc-12 */ | ||
213 | #define TLSEXT_ECPOINTFORMAT_first 0 | ||
214 | #define TLSEXT_ECPOINTFORMAT_uncompressed 0 | ||
215 | #define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1 | ||
216 | #define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2 | ||
217 | #define TLSEXT_ECPOINTFORMAT_last 2 | ||
218 | |||
219 | #ifndef OPENSSL_NO_TLSEXT | 123 | #ifndef OPENSSL_NO_TLSEXT |
220 | 124 | ||
221 | #define TLSEXT_MAXLEN_host_name 255 | 125 | #define TLSEXT_MAXLEN_host_name 255 |
@@ -265,9 +169,9 @@ SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb) | |||
265 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) | 169 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) |
266 | 170 | ||
267 | #define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ | 171 | #define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ |
268 | SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys)) | 172 | SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLXEXT_TICKET_KEYS,(keylen),(keys)) |
269 | #define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ | 173 | #define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ |
270 | SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys)) | 174 | SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLXEXT_TICKET_KEYS,(keylen),(keys)) |
271 | 175 | ||
272 | #define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ | 176 | #define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ |
273 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) | 177 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) |
@@ -275,31 +179,17 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) | |||
275 | #define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ | 179 | #define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ |
276 | SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) | 180 | SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) |
277 | 181 | ||
278 | #define SSL_set_tlsext_opaque_prf_input(s, src, len) \ | ||
279 | SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src) | ||
280 | #define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \ | ||
281 | SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb) | ||
282 | #define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \ | ||
283 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg) | ||
284 | |||
285 | #define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ | 182 | #define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ |
286 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | 183 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) |
287 | 184 | ||
288 | #endif | 185 | #endif |
289 | 186 | ||
290 | /* PSK ciphersuites from 4279 */ | 187 | /* Additional TLS ciphersuites from draft-ietf-tls-56-bit-ciphersuites-00.txt |
291 | #define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A | ||
292 | #define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B | ||
293 | #define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C | ||
294 | #define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D | ||
295 | |||
296 | /* Additional TLS ciphersuites from expired Internet Draft | ||
297 | * draft-ietf-tls-56-bit-ciphersuites-01.txt | ||
298 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see | 188 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see |
299 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably | 189 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably |
300 | * shouldn't. Note that the first two are actually not in the IDs. */ | 190 | * shouldn't. */ |
301 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 /* not in ID */ | 191 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 |
302 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 /* not in ID */ | 192 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 |
303 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 | 193 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 |
304 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 | 194 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 |
305 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 | 195 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 |
@@ -437,12 +327,6 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
437 | #define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" | 327 | #define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" |
438 | #define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" | 328 | #define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" |
439 | 329 | ||
440 | /* PSK ciphersuites from RFC 4279 */ | ||
441 | #define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA" | ||
442 | #define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA" | ||
443 | #define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA" | ||
444 | #define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA" | ||
445 | |||
446 | /* Camellia ciphersuites from RFC4132 */ | 330 | /* Camellia ciphersuites from RFC4132 */ |
447 | #define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" | 331 | #define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" |
448 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" | 332 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" |
@@ -466,7 +350,6 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
466 | #define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" | 350 | #define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" |
467 | #define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" | 351 | #define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" |
468 | 352 | ||
469 | |||
470 | #define TLS_CT_RSA_SIGN 1 | 353 | #define TLS_CT_RSA_SIGN 1 |
471 | #define TLS_CT_DSS_SIGN 2 | 354 | #define TLS_CT_DSS_SIGN 2 |
472 | #define TLS_CT_RSA_FIXED_DH 3 | 355 | #define TLS_CT_RSA_FIXED_DH 3 |
@@ -474,11 +357,7 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
474 | #define TLS_CT_ECDSA_SIGN 64 | 357 | #define TLS_CT_ECDSA_SIGN 64 |
475 | #define TLS_CT_RSA_FIXED_ECDH 65 | 358 | #define TLS_CT_RSA_FIXED_ECDH 65 |
476 | #define TLS_CT_ECDSA_FIXED_ECDH 66 | 359 | #define TLS_CT_ECDSA_FIXED_ECDH 66 |
477 | #define TLS_CT_GOST94_SIGN 21 | 360 | #define TLS_CT_NUMBER 7 |
478 | #define TLS_CT_GOST01_SIGN 22 | ||
479 | /* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see | ||
480 | * comment there) */ | ||
481 | #define TLS_CT_NUMBER 9 | ||
482 | 361 | ||
483 | #define TLS1_FINISH_MAC_LENGTH 12 | 362 | #define TLS1_FINISH_MAC_LENGTH 12 |
484 | 363 | ||
@@ -519,14 +398,10 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
519 | #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ | 398 | #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ |
520 | #endif | 399 | #endif |
521 | 400 | ||
522 | /* TLS Session Ticket extension struct */ | ||
523 | struct tls_session_ticket_ext_st | ||
524 | { | ||
525 | unsigned short length; | ||
526 | void *data; | ||
527 | }; | ||
528 | |||
529 | #ifdef __cplusplus | 401 | #ifdef __cplusplus |
530 | } | 402 | } |
531 | #endif | 403 | #endif |
532 | #endif | 404 | #endif |
405 | |||
406 | |||
407 | |||