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