diff options
author | djm <> | 2010-10-01 22:54:21 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:54:21 +0000 |
commit | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (patch) | |
tree | e03b9f1bd051e844b971936729e9df549a209130 /src/lib/libcrypto/err/err.h | |
parent | e6b755d2a53d3cac7a344dfdd6bf7c951cac754c (diff) | |
download | openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.gz openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.bz2 openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.zip |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/err/err.h')
-rw-r--r-- | src/lib/libcrypto/err/err.h | 77 |
1 files changed, 66 insertions, 11 deletions
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index dcac415231..b9f8c16d47 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
@@ -55,6 +55,59 @@ | |||
55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
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 | */ | ||
58 | 111 | ||
59 | #ifndef HEADER_ERR_H | 112 | #ifndef HEADER_ERR_H |
60 | #define HEADER_ERR_H | 113 | #define HEADER_ERR_H |
@@ -94,7 +147,7 @@ extern "C" { | |||
94 | #define ERR_NUM_ERRORS 16 | 147 | #define ERR_NUM_ERRORS 16 |
95 | typedef struct err_state_st | 148 | typedef struct err_state_st |
96 | { | 149 | { |
97 | unsigned long pid; | 150 | CRYPTO_THREADID tid; |
98 | int err_flags[ERR_NUM_ERRORS]; | 151 | int err_flags[ERR_NUM_ERRORS]; |
99 | unsigned long err_buffer[ERR_NUM_ERRORS]; | 152 | unsigned long err_buffer[ERR_NUM_ERRORS]; |
100 | char *err_data[ERR_NUM_ERRORS]; | 153 | char *err_data[ERR_NUM_ERRORS]; |
@@ -142,7 +195,9 @@ typedef struct err_state_st | |||
142 | #define ERR_LIB_STORE 44 | 195 | #define ERR_LIB_STORE 44 |
143 | #define ERR_LIB_FIPS 45 | 196 | #define ERR_LIB_FIPS 45 |
144 | #define ERR_LIB_CMS 46 | 197 | #define ERR_LIB_CMS 46 |
145 | #define ERR_LIB_JPAKE 47 | 198 | #define ERR_LIB_TS 47 |
199 | #define ERR_LIB_HMAC 48 | ||
200 | #define ERR_LIB_JPAKE 49 | ||
146 | 201 | ||
147 | #define ERR_LIB_USER 128 | 202 | #define ERR_LIB_USER 128 |
148 | 203 | ||
@@ -176,6 +231,8 @@ typedef struct err_state_st | |||
176 | #define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) | 231 | #define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) |
177 | #define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) | 232 | #define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) |
178 | #define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) | 233 | #define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) |
234 | #define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__) | ||
235 | #define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__) | ||
179 | #define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) | 236 | #define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) |
180 | 237 | ||
181 | /* Borland C seems too stupid to be able to shift and do longs in | 238 | /* Borland C seems too stupid to be able to shift and do longs in |
@@ -232,6 +289,7 @@ typedef struct err_state_st | |||
232 | #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ | 289 | #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ |
233 | #define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ | 290 | #define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ |
234 | #define ERR_R_STORE_LIB ERR_LIB_STORE /* 44 */ | 291 | #define ERR_R_STORE_LIB ERR_LIB_STORE /* 44 */ |
292 | #define ERR_R_TS_LIB ERR_LIB_TS /* 45 */ | ||
235 | 293 | ||
236 | #define ERR_R_NESTED_ASN1_ERROR 58 | 294 | #define ERR_R_NESTED_ASN1_ERROR 58 |
237 | #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 | 295 | #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 |
@@ -294,13 +352,16 @@ void ERR_load_ERR_strings(void); | |||
294 | void ERR_load_crypto_strings(void); | 352 | void ERR_load_crypto_strings(void); |
295 | void ERR_free_strings(void); | 353 | void ERR_free_strings(void); |
296 | 354 | ||
355 | void ERR_remove_thread_state(const CRYPTO_THREADID *tid); | ||
356 | #ifndef OPENSSL_NO_DEPRECATED | ||
297 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ | 357 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ |
358 | #endif | ||
298 | ERR_STATE *ERR_get_state(void); | 359 | ERR_STATE *ERR_get_state(void); |
299 | 360 | ||
300 | #ifndef OPENSSL_NO_LHASH | 361 | #ifndef OPENSSL_NO_LHASH |
301 | LHASH *ERR_get_string_table(void); | 362 | LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void); |
302 | LHASH *ERR_get_err_state_table(void); | 363 | LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void); |
303 | void ERR_release_err_state_table(LHASH **hash); | 364 | void ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash); |
304 | #endif | 365 | #endif |
305 | 366 | ||
306 | int ERR_get_next_error_library(void); | 367 | int ERR_get_next_error_library(void); |
@@ -308,12 +369,6 @@ int ERR_get_next_error_library(void); | |||
308 | int ERR_set_mark(void); | 369 | int ERR_set_mark(void); |
309 | int ERR_pop_to_mark(void); | 370 | int ERR_pop_to_mark(void); |
310 | 371 | ||
311 | #ifdef OPENSSL_FIPS | ||
312 | void int_ERR_set_state_func(ERR_STATE *(*get_func)(void), | ||
313 | void (*remove_func)(unsigned long pid)); | ||
314 | void int_ERR_lib_init(void); | ||
315 | #endif | ||
316 | |||
317 | /* Already defined in ossl_typ.h */ | 372 | /* Already defined in ossl_typ.h */ |
318 | /* typedef struct st_ERR_FNS ERR_FNS; */ | 373 | /* typedef struct st_ERR_FNS ERR_FNS; */ |
319 | /* An application can use this function and provide the return value to loaded | 374 | /* An application can use this function and provide the return value to loaded |