diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/err/err.h | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/err/err.h')
-rw-r--r-- | src/lib/libcrypto/err/err.h | 183 |
1 files changed, 101 insertions, 82 deletions
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index 7388a4a937..cc9bb649ea 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
@@ -59,15 +59,15 @@ | |||
59 | #ifndef HEADER_ERR_H | 59 | #ifndef HEADER_ERR_H |
60 | #define HEADER_ERR_H | 60 | #define HEADER_ERR_H |
61 | 61 | ||
62 | #ifndef NO_FP_API | 62 | #ifndef OPENSSL_NO_FP_API |
63 | #include <stdio.h> | 63 | #include <stdio.h> |
64 | #include <stdlib.h> | 64 | #include <stdlib.h> |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #ifndef NO_BIO | 67 | #ifndef OPENSSL_NO_BIO |
68 | #include <openssl/bio.h> | 68 | #include <openssl/bio.h> |
69 | #endif | 69 | #endif |
70 | #ifndef NO_LHASH | 70 | #ifndef OPENSSL_NO_LHASH |
71 | #include <openssl/lhash.h> | 71 | #include <openssl/lhash.h> |
72 | #endif | 72 | #endif |
73 | 73 | ||
@@ -75,13 +75,7 @@ | |||
75 | extern "C" { | 75 | extern "C" { |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /* The following is a bit of a trick to help the object files only contain | 78 | #ifndef OPENSSL_NO_ERR |
79 | * the 'name of the file' string once. Since 'err.h' is protected by the | ||
80 | * HEADER_ERR_H stuff, this should be included only once per file. */ | ||
81 | |||
82 | #define ERR_file_name __FILE__ | ||
83 | |||
84 | #ifndef NO_ERR | ||
85 | #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) | 79 | #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) |
86 | #else | 80 | #else |
87 | #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) | 81 | #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) |
@@ -116,16 +110,17 @@ typedef struct err_state_st | |||
116 | #define ERR_LIB_PEM 9 | 110 | #define ERR_LIB_PEM 9 |
117 | #define ERR_LIB_DSA 10 | 111 | #define ERR_LIB_DSA 10 |
118 | #define ERR_LIB_X509 11 | 112 | #define ERR_LIB_X509 11 |
119 | #define ERR_LIB_METH 12 | 113 | /* #define ERR_LIB_METH 12 */ |
120 | #define ERR_LIB_ASN1 13 | 114 | #define ERR_LIB_ASN1 13 |
121 | #define ERR_LIB_CONF 14 | 115 | #define ERR_LIB_CONF 14 |
122 | #define ERR_LIB_CRYPTO 15 | 116 | #define ERR_LIB_CRYPTO 15 |
117 | #define ERR_LIB_EC 16 | ||
123 | #define ERR_LIB_SSL 20 | 118 | #define ERR_LIB_SSL 20 |
124 | #define ERR_LIB_SSL23 21 | 119 | /* #define ERR_LIB_SSL23 21 */ |
125 | #define ERR_LIB_SSL2 22 | 120 | /* #define ERR_LIB_SSL2 22 */ |
126 | #define ERR_LIB_SSL3 23 | 121 | /* #define ERR_LIB_SSL3 23 */ |
127 | #define ERR_LIB_RSAREF 30 | 122 | /* #define ERR_LIB_RSAREF 30 */ |
128 | #define ERR_LIB_PROXY 31 | 123 | /* #define ERR_LIB_PROXY 31 */ |
129 | #define ERR_LIB_BIO 32 | 124 | #define ERR_LIB_BIO 32 |
130 | #define ERR_LIB_PKCS7 33 | 125 | #define ERR_LIB_PKCS7 33 |
131 | #define ERR_LIB_X509V3 34 | 126 | #define ERR_LIB_X509V3 34 |
@@ -133,36 +128,37 @@ typedef struct err_state_st | |||
133 | #define ERR_LIB_RAND 36 | 128 | #define ERR_LIB_RAND 36 |
134 | #define ERR_LIB_DSO 37 | 129 | #define ERR_LIB_DSO 37 |
135 | #define ERR_LIB_ENGINE 38 | 130 | #define ERR_LIB_ENGINE 38 |
131 | #define ERR_LIB_OCSP 39 | ||
132 | #define ERR_LIB_UI 40 | ||
133 | #define ERR_LIB_COMP 41 | ||
136 | 134 | ||
137 | #define ERR_LIB_USER 128 | 135 | #define ERR_LIB_USER 128 |
138 | 136 | ||
139 | #define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),ERR_file_name,__LINE__) | 137 | #define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__) |
140 | #define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),ERR_file_name,__LINE__) | 138 | #define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__) |
141 | #define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),ERR_file_name,__LINE__) | 139 | #define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__) |
142 | #define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),ERR_file_name,__LINE__) | 140 | #define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__) |
143 | #define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),ERR_file_name,__LINE__) | 141 | #define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__) |
144 | #define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),ERR_file_name,__LINE__) | 142 | #define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__) |
145 | #define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),ERR_file_name,__LINE__) | 143 | #define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__) |
146 | #define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),ERR_file_name,__LINE__) | 144 | #define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__) |
147 | #define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),ERR_file_name,__LINE__) | 145 | #define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__) |
148 | #define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),ERR_file_name,__LINE__) | 146 | #define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__) |
149 | #define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),ERR_file_name,__LINE__) | 147 | #define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__) |
150 | #define METHerr(f,r) ERR_PUT_error(ERR_LIB_METH,(f),(r),ERR_file_name,__LINE__) | 148 | #define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__) |
151 | #define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),ERR_file_name,__LINE__) | 149 | #define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__) |
152 | #define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),ERR_file_name,__LINE__) | 150 | #define ECerr(f,r) ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__) |
153 | #define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),ERR_file_name,__LINE__) | 151 | #define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__) |
154 | #define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),ERR_file_name,__LINE__) | 152 | #define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__) |
155 | #define SSL23err(f,r) ERR_PUT_error(ERR_LIB_SSL23,(f),(r),ERR_file_name,__LINE__) | 153 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__) |
156 | #define SSL2err(f,r) ERR_PUT_error(ERR_LIB_SSL2,(f),(r),ERR_file_name,__LINE__) | 154 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__) |
157 | #define SSL3err(f,r) ERR_PUT_error(ERR_LIB_SSL3,(f),(r),ERR_file_name,__LINE__) | 155 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__) |
158 | #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__) | 156 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__) |
159 | #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__) | 157 | #define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__) |
160 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) | 158 | #define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__) |
161 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) | 159 | #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) |
162 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) | 160 | #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) |
163 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__) | 161 | #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) |
164 | #define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),ERR_file_name,__LINE__) | ||
165 | #define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),ERR_file_name,__LINE__) | ||
166 | 162 | ||
167 | /* Borland C seems too stupid to be able to shift and do longs in | 163 | /* Borland C seems too stupid to be able to shift and do longs in |
168 | * the pre-processor :-( */ | 164 | * the pre-processor :-( */ |
@@ -174,6 +170,7 @@ typedef struct err_state_st | |||
174 | #define ERR_GET_REASON(l) (int)((l)&0xfffL) | 170 | #define ERR_GET_REASON(l) (int)((l)&0xfffL) |
175 | #define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL) | 171 | #define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL) |
176 | 172 | ||
173 | |||
177 | /* OS functions */ | 174 | /* OS functions */ |
178 | #define SYS_F_FOPEN 1 | 175 | #define SYS_F_FOPEN 1 |
179 | #define SYS_F_CONNECT 2 | 176 | #define SYS_F_CONNECT 2 |
@@ -186,44 +183,51 @@ typedef struct err_state_st | |||
186 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ | 183 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ |
187 | #define SYS_F_OPENDIR 10 | 184 | #define SYS_F_OPENDIR 10 |
188 | 185 | ||
189 | #define ERR_R_FATAL 32 | 186 | |
190 | /* reasons */ | 187 | /* reasons */ |
191 | #define ERR_R_SYS_LIB ERR_LIB_SYS | 188 | #define ERR_R_SYS_LIB ERR_LIB_SYS /* 2 */ |
192 | #define ERR_R_BN_LIB ERR_LIB_BN | 189 | #define ERR_R_BN_LIB ERR_LIB_BN /* 3 */ |
193 | #define ERR_R_RSA_LIB ERR_LIB_RSA | 190 | #define ERR_R_RSA_LIB ERR_LIB_RSA /* 4 */ |
194 | #define ERR_R_DSA_LIB ERR_LIB_DSA | 191 | #define ERR_R_DH_LIB ERR_LIB_DH /* 5 */ |
195 | #define ERR_R_DH_LIB ERR_LIB_DH | 192 | #define ERR_R_EVP_LIB ERR_LIB_EVP /* 6 */ |
196 | #define ERR_R_EVP_LIB ERR_LIB_EVP | 193 | #define ERR_R_BUF_LIB ERR_LIB_BUF /* 7 */ |
197 | #define ERR_R_BUF_LIB ERR_LIB_BUF | 194 | #define ERR_R_OBJ_LIB ERR_LIB_OBJ /* 8 */ |
198 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 195 | #define ERR_R_PEM_LIB ERR_LIB_PEM /* 9 */ |
199 | #define ERR_R_OBJ_LIB ERR_LIB_OBJ | 196 | #define ERR_R_DSA_LIB ERR_LIB_DSA /* 10 */ |
200 | #define ERR_R_PEM_LIB ERR_LIB_PEM | 197 | #define ERR_R_X509_LIB ERR_LIB_X509 /* 11 */ |
201 | #define ERR_R_X509_LIB ERR_LIB_X509 | 198 | #define ERR_R_ASN1_LIB ERR_LIB_ASN1 /* 13 */ |
202 | #define ERR_R_METH_LIB ERR_LIB_METH | 199 | #define ERR_R_CONF_LIB ERR_LIB_CONF /* 14 */ |
203 | #define ERR_R_ASN1_LIB ERR_LIB_ASN1 | 200 | #define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO /* 15 */ |
204 | #define ERR_R_CONF_LIB ERR_LIB_CONF | 201 | #define ERR_R_EC_LIB ERR_LIB_EC /* 16 */ |
205 | #define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO | 202 | #define ERR_R_SSL_LIB ERR_LIB_SSL /* 20 */ |
206 | #define ERR_R_SSL_LIB ERR_LIB_SSL | 203 | #define ERR_R_BIO_LIB ERR_LIB_BIO /* 32 */ |
207 | #define ERR_R_SSL23_LIB ERR_LIB_SSL23 | 204 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 /* 33 */ |
208 | #define ERR_R_SSL2_LIB ERR_LIB_SSL2 | 205 | #define ERR_R_X509V3_LIB ERR_LIB_X509V3 /* 34 */ |
209 | #define ERR_R_SSL3_LIB ERR_LIB_SSL3 | 206 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 /* 35 */ |
210 | #define ERR_R_PROXY_LIB ERR_LIB_PROXY | 207 | #define ERR_R_RAND_LIB ERR_LIB_RAND /* 36 */ |
211 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 208 | #define ERR_R_DSO_LIB ERR_LIB_DSO /* 37 */ |
212 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 | 209 | #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE /* 38 */ |
213 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 | 210 | #define ERR_R_OCSP_LIB ERR_LIB_OCSP /* 39 */ |
214 | #define ERR_R_DSO_LIB ERR_LIB_DSO | 211 | #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ |
215 | #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE | 212 | #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ |
213 | |||
214 | #define ERR_R_NESTED_ASN1_ERROR 58 | ||
215 | #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 | ||
216 | #define ERR_R_BAD_GET_ASN1_OBJECT_CALL 60 | ||
217 | #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE 61 | ||
218 | #define ERR_R_ASN1_LENGTH_MISMATCH 62 | ||
219 | #define ERR_R_MISSING_ASN1_EOS 63 | ||
216 | 220 | ||
217 | /* fatal error */ | 221 | /* fatal error */ |
222 | #define ERR_R_FATAL 64 | ||
218 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) | 223 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) |
219 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) | 224 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) |
220 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) | 225 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) |
221 | #define ERR_R_NESTED_ASN1_ERROR (4) | 226 | #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) |
222 | #define ERR_R_BAD_ASN1_OBJECT_HEADER (5) | 227 | |
223 | #define ERR_R_BAD_GET_ASN1_OBJECT_CALL (6) | 228 | /* 99 is the maximum possible ERR_R_... code, higher values |
224 | #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE (7) | 229 | * are reserved for the individual libraries */ |
225 | #define ERR_R_ASN1_LENGTH_MISMATCH (8) | 230 | |
226 | #define ERR_R_MISSING_ASN1_EOS (9) | ||
227 | 231 | ||
228 | typedef struct ERR_string_data_st | 232 | typedef struct ERR_string_data_st |
229 | { | 233 | { |
@@ -234,28 +238,35 @@ typedef struct ERR_string_data_st | |||
234 | void ERR_put_error(int lib, int func,int reason,const char *file,int line); | 238 | void ERR_put_error(int lib, int func,int reason,const char *file,int line); |
235 | void ERR_set_error_data(char *data,int flags); | 239 | void ERR_set_error_data(char *data,int flags); |
236 | 240 | ||
237 | unsigned long ERR_get_error(void ); | 241 | unsigned long ERR_get_error(void); |
238 | unsigned long ERR_get_error_line(const char **file,int *line); | 242 | unsigned long ERR_get_error_line(const char **file,int *line); |
239 | unsigned long ERR_get_error_line_data(const char **file,int *line, | 243 | unsigned long ERR_get_error_line_data(const char **file,int *line, |
240 | const char **data, int *flags); | 244 | const char **data, int *flags); |
241 | unsigned long ERR_peek_error(void ); | 245 | unsigned long ERR_peek_error(void); |
242 | unsigned long ERR_peek_error_line(const char **file,int *line); | 246 | unsigned long ERR_peek_error_line(const char **file,int *line); |
243 | unsigned long ERR_peek_error_line_data(const char **file,int *line, | 247 | unsigned long ERR_peek_error_line_data(const char **file,int *line, |
244 | const char **data,int *flags); | 248 | const char **data,int *flags); |
249 | unsigned long ERR_peek_last_error(void); | ||
250 | unsigned long ERR_peek_last_error_line(const char **file,int *line); | ||
251 | unsigned long ERR_peek_last_error_line_data(const char **file,int *line, | ||
252 | const char **data,int *flags); | ||
245 | void ERR_clear_error(void ); | 253 | void ERR_clear_error(void ); |
246 | char *ERR_error_string(unsigned long e,char *buf); | 254 | char *ERR_error_string(unsigned long e,char *buf); |
247 | void ERR_error_string_n(unsigned long e, char *buf, size_t len); | 255 | void ERR_error_string_n(unsigned long e, char *buf, size_t len); |
248 | const char *ERR_lib_error_string(unsigned long e); | 256 | const char *ERR_lib_error_string(unsigned long e); |
249 | const char *ERR_func_error_string(unsigned long e); | 257 | const char *ERR_func_error_string(unsigned long e); |
250 | const char *ERR_reason_error_string(unsigned long e); | 258 | const char *ERR_reason_error_string(unsigned long e); |
251 | #ifndef NO_FP_API | 259 | void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), |
260 | void *u); | ||
261 | #ifndef OPENSSL_NO_FP_API | ||
252 | void ERR_print_errors_fp(FILE *fp); | 262 | void ERR_print_errors_fp(FILE *fp); |
253 | #endif | 263 | #endif |
254 | #ifndef NO_BIO | 264 | #ifndef OPENSSL_NO_BIO |
255 | void ERR_print_errors(BIO *bp); | 265 | void ERR_print_errors(BIO *bp); |
256 | void ERR_add_error_data(int num, ...); | 266 | void ERR_add_error_data(int num, ...); |
257 | #endif | 267 | #endif |
258 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); | 268 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); |
269 | void ERR_unload_strings(int lib,ERR_STRING_DATA str[]); | ||
259 | void ERR_load_ERR_strings(void); | 270 | void ERR_load_ERR_strings(void); |
260 | void ERR_load_crypto_strings(void); | 271 | void ERR_load_crypto_strings(void); |
261 | void ERR_free_strings(void); | 272 | void ERR_free_strings(void); |
@@ -263,14 +274,22 @@ void ERR_free_strings(void); | |||
263 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ | 274 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ |
264 | ERR_STATE *ERR_get_state(void); | 275 | ERR_STATE *ERR_get_state(void); |
265 | 276 | ||
266 | #ifndef NO_LHASH | 277 | #ifndef OPENSSL_NO_LHASH |
267 | LHASH *ERR_get_string_table(void); | 278 | LHASH *ERR_get_string_table(void); |
268 | LHASH *ERR_get_err_state_table(void); /* even less thread-safe than | 279 | LHASH *ERR_get_err_state_table(void); |
269 | * ERR_get_string_table :-) */ | ||
270 | #endif | 280 | #endif |
271 | 281 | ||
272 | int ERR_get_next_error_library(void); | 282 | int ERR_get_next_error_library(void); |
273 | 283 | ||
284 | /* This opaque type encapsulates the low-level error-state functions */ | ||
285 | typedef struct st_ERR_FNS ERR_FNS; | ||
286 | /* An application can use this function and provide the return value to loaded | ||
287 | * modules that should use the application's ERR state/functionality */ | ||
288 | const ERR_FNS *ERR_get_implementation(void); | ||
289 | /* A loaded module should call this function prior to any ERR operations using | ||
290 | * the application's "ERR_FNS". */ | ||
291 | int ERR_set_implementation(const ERR_FNS *fns); | ||
292 | |||
274 | #ifdef __cplusplus | 293 | #ifdef __cplusplus |
275 | } | 294 | } |
276 | #endif | 295 | #endif |