diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/err/err.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index 15bafbff43..7388a4a937 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
| @@ -59,12 +59,20 @@ | |||
| 59 | #ifndef HEADER_ERR_H | 59 | #ifndef HEADER_ERR_H |
| 60 | #define HEADER_ERR_H | 60 | #define HEADER_ERR_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifndef NO_FP_API | 62 | #ifndef NO_FP_API |
| 67 | #include <stdio.h> | 63 | #include <stdio.h> |
| 64 | #include <stdlib.h> | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #ifndef NO_BIO | ||
| 68 | #include <openssl/bio.h> | ||
| 69 | #endif | ||
| 70 | #ifndef NO_LHASH | ||
| 71 | #include <openssl/lhash.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 68 | #endif | 76 | #endif |
| 69 | 77 | ||
| 70 | /* The following is a bit of a trick to help the object files only contain | 78 | /* The following is a bit of a trick to help the object files only contain |
| @@ -123,6 +131,8 @@ typedef struct err_state_st | |||
| 123 | #define ERR_LIB_X509V3 34 | 131 | #define ERR_LIB_X509V3 34 |
| 124 | #define ERR_LIB_PKCS12 35 | 132 | #define ERR_LIB_PKCS12 35 |
| 125 | #define ERR_LIB_RAND 36 | 133 | #define ERR_LIB_RAND 36 |
| 134 | #define ERR_LIB_DSO 37 | ||
| 135 | #define ERR_LIB_ENGINE 38 | ||
| 126 | 136 | ||
| 127 | #define ERR_LIB_USER 128 | 137 | #define ERR_LIB_USER 128 |
| 128 | 138 | ||
| @@ -151,6 +161,8 @@ typedef struct err_state_st | |||
| 151 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) | 161 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) |
| 152 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) | 162 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) |
| 153 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__) | 163 | #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__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__) | ||
| 154 | 166 | ||
| 155 | /* Borland C seems too stupid to be able to shift and do longs in | 167 | /* Borland C seems too stupid to be able to shift and do longs in |
| 156 | * the pre-processor :-( */ | 168 | * the pre-processor :-( */ |
| @@ -199,6 +211,8 @@ typedef struct err_state_st | |||
| 199 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 211 | #define ERR_R_BIO_LIB ERR_LIB_BIO |
| 200 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 | 212 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 |
| 201 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 | 213 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 |
| 214 | #define ERR_R_DSO_LIB ERR_LIB_DSO | ||
| 215 | #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE | ||
| 202 | 216 | ||
| 203 | /* fatal error */ | 217 | /* fatal error */ |
| 204 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) | 218 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) |
| @@ -230,13 +244,14 @@ unsigned long ERR_peek_error_line_data(const char **file,int *line, | |||
| 230 | const char **data,int *flags); | 244 | const char **data,int *flags); |
| 231 | void ERR_clear_error(void ); | 245 | void ERR_clear_error(void ); |
| 232 | char *ERR_error_string(unsigned long e,char *buf); | 246 | char *ERR_error_string(unsigned long e,char *buf); |
| 247 | void ERR_error_string_n(unsigned long e, char *buf, size_t len); | ||
| 233 | const char *ERR_lib_error_string(unsigned long e); | 248 | const char *ERR_lib_error_string(unsigned long e); |
| 234 | const char *ERR_func_error_string(unsigned long e); | 249 | const char *ERR_func_error_string(unsigned long e); |
| 235 | const char *ERR_reason_error_string(unsigned long e); | 250 | const char *ERR_reason_error_string(unsigned long e); |
| 236 | #ifndef NO_FP_API | 251 | #ifndef NO_FP_API |
| 237 | void ERR_print_errors_fp(FILE *fp); | 252 | void ERR_print_errors_fp(FILE *fp); |
| 238 | #endif | 253 | #endif |
| 239 | #ifdef HEADER_BIO_H | 254 | #ifndef NO_BIO |
| 240 | void ERR_print_errors(BIO *bp); | 255 | void ERR_print_errors(BIO *bp); |
| 241 | void ERR_add_error_data(int num, ...); | 256 | void ERR_add_error_data(int num, ...); |
| 242 | #endif | 257 | #endif |
| @@ -248,15 +263,13 @@ void ERR_free_strings(void); | |||
| 248 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ | 263 | void ERR_remove_state(unsigned long pid); /* if zero we look it up */ |
| 249 | ERR_STATE *ERR_get_state(void); | 264 | ERR_STATE *ERR_get_state(void); |
| 250 | 265 | ||
| 251 | #ifdef HEADER_LHASH_H | 266 | #ifndef NO_LHASH |
| 252 | LHASH *ERR_get_string_table(void ); | 267 | LHASH *ERR_get_string_table(void); |
| 253 | LHASH *ERR_get_err_state_table(void ); | 268 | LHASH *ERR_get_err_state_table(void); /* even less thread-safe than |
| 254 | #else | 269 | * ERR_get_string_table :-) */ |
| 255 | char *ERR_get_string_table(void ); | ||
| 256 | char *ERR_get_err_state_table(void ); | ||
| 257 | #endif | 270 | #endif |
| 258 | 271 | ||
| 259 | int ERR_get_next_error_library(void ); | 272 | int ERR_get_next_error_library(void); |
| 260 | 273 | ||
| 261 | #ifdef __cplusplus | 274 | #ifdef __cplusplus |
| 262 | } | 275 | } |
