diff options
author | djm <> | 2010-10-01 22:59:01 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:59:01 +0000 |
commit | fe047d8b632246cb2db3234a0a4f32e5c318857b (patch) | |
tree | 939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libssl/tls1.h | |
parent | 2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff) | |
download | openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2 openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip |
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libssl/tls1.h')
-rw-r--r-- | src/lib/libssl/tls1.h | 147 |
1 files changed, 136 insertions, 11 deletions
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index 2d1d293e1a..b3cc8f098b 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
@@ -56,6 +56,59 @@ | |||
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 | /* ==================================================================== | ||
59 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 112 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
60 | * | 113 | * |
61 | * Portions of the attached software ("Contribution") are developed by | 114 | * Portions of the attached software ("Contribution") are developed by |
@@ -68,6 +121,32 @@ | |||
68 | * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. | 121 | * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. |
69 | * | 122 | * |
70 | */ | 123 | */ |
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 | */ | ||
71 | 150 | ||
72 | #ifndef HEADER_TLS1_H | 151 | #ifndef HEADER_TLS1_H |
73 | #define HEADER_TLS1_H | 152 | #define HEADER_TLS1_H |
@@ -104,22 +183,39 @@ extern "C" { | |||
104 | #define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 | 183 | #define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 |
105 | #define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ | 184 | #define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ |
106 | 185 | ||
107 | /* ExtensionType values from RFC 3546 */ | 186 | /* ExtensionType values from RFC3546 / RFC4366 */ |
108 | #define TLSEXT_TYPE_server_name 0 | 187 | #define TLSEXT_TYPE_server_name 0 |
109 | #define TLSEXT_TYPE_max_fragment_length 1 | 188 | #define TLSEXT_TYPE_max_fragment_length 1 |
110 | #define TLSEXT_TYPE_client_certificate_url 2 | 189 | #define TLSEXT_TYPE_client_certificate_url 2 |
111 | #define TLSEXT_TYPE_trusted_ca_keys 3 | 190 | #define TLSEXT_TYPE_trusted_ca_keys 3 |
112 | #define TLSEXT_TYPE_truncated_hmac 4 | 191 | #define TLSEXT_TYPE_truncated_hmac 4 |
113 | #define TLSEXT_TYPE_status_request 5 | 192 | #define TLSEXT_TYPE_status_request 5 |
193 | /* ExtensionType values from RFC4492 */ | ||
114 | #define TLSEXT_TYPE_elliptic_curves 10 | 194 | #define TLSEXT_TYPE_elliptic_curves 10 |
115 | #define TLSEXT_TYPE_ec_point_formats 11 | 195 | #define TLSEXT_TYPE_ec_point_formats 11 |
116 | #define TLSEXT_TYPE_session_ticket 35 | 196 | #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 | ||
117 | 206 | ||
118 | /* NameType value from RFC 3546 */ | 207 | /* NameType value from RFC 3546 */ |
119 | #define TLSEXT_NAMETYPE_host_name 0 | 208 | #define TLSEXT_NAMETYPE_host_name 0 |
120 | /* status request value from RFC 3546 */ | 209 | /* status request value from RFC 3546 */ |
121 | #define TLSEXT_STATUSTYPE_ocsp 1 | 210 | #define TLSEXT_STATUSTYPE_ocsp 1 |
122 | 211 | ||
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 | |||
123 | #ifndef OPENSSL_NO_TLSEXT | 219 | #ifndef OPENSSL_NO_TLSEXT |
124 | 220 | ||
125 | #define TLSEXT_MAXLEN_host_name 255 | 221 | #define TLSEXT_MAXLEN_host_name 255 |
@@ -169,9 +265,9 @@ SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb) | |||
169 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) | 265 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) |
170 | 266 | ||
171 | #define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ | 267 | #define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ |
172 | SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLXEXT_TICKET_KEYS,(keylen),(keys)) | 268 | SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys)) |
173 | #define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ | 269 | #define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ |
174 | SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLXEXT_TICKET_KEYS,(keylen),(keys)) | 270 | SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys)) |
175 | 271 | ||
176 | #define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ | 272 | #define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ |
177 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) | 273 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) |
@@ -179,17 +275,31 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) | |||
179 | #define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ | 275 | #define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ |
180 | SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) | 276 | SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) |
181 | 277 | ||
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 | |||
182 | #define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ | 285 | #define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ |
183 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | 286 | SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) |
184 | 287 | ||
185 | #endif | 288 | #endif |
186 | 289 | ||
187 | /* Additional TLS ciphersuites from draft-ietf-tls-56-bit-ciphersuites-00.txt | 290 | /* PSK ciphersuites from 4279 */ |
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 | ||
188 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see | 298 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see |
189 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably | 299 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably |
190 | * shouldn't. */ | 300 | * shouldn't. Note that the first two are actually not in the IDs. */ |
191 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 | 301 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 /* not in ID */ |
192 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 | 302 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 /* not in ID */ |
193 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 | 303 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 |
194 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 | 304 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 |
195 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 | 305 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 |
@@ -327,6 +437,12 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
327 | #define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" | 437 | #define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" |
328 | #define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" | 438 | #define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" |
329 | 439 | ||
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 | |||
330 | /* Camellia ciphersuites from RFC4132 */ | 446 | /* Camellia ciphersuites from RFC4132 */ |
331 | #define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" | 447 | #define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" |
332 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" | 448 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" |
@@ -350,6 +466,7 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
350 | #define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" | 466 | #define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" |
351 | #define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" | 467 | #define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" |
352 | 468 | ||
469 | |||
353 | #define TLS_CT_RSA_SIGN 1 | 470 | #define TLS_CT_RSA_SIGN 1 |
354 | #define TLS_CT_DSS_SIGN 2 | 471 | #define TLS_CT_DSS_SIGN 2 |
355 | #define TLS_CT_RSA_FIXED_DH 3 | 472 | #define TLS_CT_RSA_FIXED_DH 3 |
@@ -357,7 +474,11 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
357 | #define TLS_CT_ECDSA_SIGN 64 | 474 | #define TLS_CT_ECDSA_SIGN 64 |
358 | #define TLS_CT_RSA_FIXED_ECDH 65 | 475 | #define TLS_CT_RSA_FIXED_ECDH 65 |
359 | #define TLS_CT_ECDSA_FIXED_ECDH 66 | 476 | #define TLS_CT_ECDSA_FIXED_ECDH 66 |
360 | #define TLS_CT_NUMBER 7 | 477 | #define TLS_CT_GOST94_SIGN 21 |
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 | ||
361 | 482 | ||
362 | #define TLS1_FINISH_MAC_LENGTH 12 | 483 | #define TLS1_FINISH_MAC_LENGTH 12 |
363 | 484 | ||
@@ -398,10 +519,14 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
398 | #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ | 519 | #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ |
399 | #endif | 520 | #endif |
400 | 521 | ||
522 | /* TLS Session Ticket extension struct */ | ||
523 | struct tls_session_ticket_ext_st | ||
524 | { | ||
525 | unsigned short length; | ||
526 | void *data; | ||
527 | }; | ||
528 | |||
401 | #ifdef __cplusplus | 529 | #ifdef __cplusplus |
402 | } | 530 | } |
403 | #endif | 531 | #endif |
404 | #endif | 532 | #endif |
405 | |||
406 | |||
407 | |||