diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/err/err.h | 82 |
1 files changed, 29 insertions, 53 deletions
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index 75f931be11..9411fb3568 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
| @@ -63,6 +63,10 @@ | |||
| 63 | extern "C" { | 63 | extern "C" { |
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | #ifndef NO_FP_API | ||
| 67 | #include <stdio.h> | ||
| 68 | #endif | ||
| 69 | |||
| 66 | /* The following is a bit of a trick to help the object files only contain | 70 | /* The following is a bit of a trick to help the object files only contain |
| 67 | * the 'name of the file' string once. Since 'err.h' is protected by the | 71 | * the 'name of the file' string once. Since 'err.h' is protected by the |
| 68 | * HEADER_ERR_H stuff, this should be included only once per file. */ | 72 | * HEADER_ERR_H stuff, this should be included only once per file. */ |
| @@ -87,7 +91,7 @@ typedef struct err_state_st | |||
| 87 | unsigned long err_buffer[ERR_NUM_ERRORS]; | 91 | unsigned long err_buffer[ERR_NUM_ERRORS]; |
| 88 | char *err_data[ERR_NUM_ERRORS]; | 92 | char *err_data[ERR_NUM_ERRORS]; |
| 89 | int err_data_flags[ERR_NUM_ERRORS]; | 93 | int err_data_flags[ERR_NUM_ERRORS]; |
| 90 | char *err_file[ERR_NUM_ERRORS]; | 94 | const char *err_file[ERR_NUM_ERRORS]; |
| 91 | int err_line[ERR_NUM_ERRORS]; | 95 | int err_line[ERR_NUM_ERRORS]; |
| 92 | int top,bottom; | 96 | int top,bottom; |
| 93 | } ERR_STATE; | 97 | } ERR_STATE; |
| @@ -116,6 +120,8 @@ typedef struct err_state_st | |||
| 116 | #define ERR_LIB_PROXY 31 | 120 | #define ERR_LIB_PROXY 31 |
| 117 | #define ERR_LIB_BIO 32 | 121 | #define ERR_LIB_BIO 32 |
| 118 | #define ERR_LIB_PKCS7 33 | 122 | #define ERR_LIB_PKCS7 33 |
| 123 | #define ERR_LIB_X509V3 34 | ||
| 124 | #define ERR_LIB_PKCS12 35 | ||
| 119 | 125 | ||
| 120 | #define ERR_LIB_USER 128 | 126 | #define ERR_LIB_USER 128 |
| 121 | 127 | ||
| @@ -141,6 +147,8 @@ typedef struct err_state_st | |||
| 141 | #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__) | 147 | #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__) |
| 142 | #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__) | 148 | #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__) |
| 143 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) | 149 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) |
| 150 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) | ||
| 151 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) | ||
| 144 | 152 | ||
| 145 | /* Borland C seems too stupid to be able to shift and do longs in | 153 | /* Borland C seems too stupid to be able to shift and do longs in |
| 146 | * the pre-processor :-( */ | 154 | * the pre-processor :-( */ |
| @@ -162,6 +170,7 @@ typedef struct err_state_st | |||
| 162 | #define SYS_F_LISTEN 7 | 170 | #define SYS_F_LISTEN 7 |
| 163 | #define SYS_F_ACCEPT 8 | 171 | #define SYS_F_ACCEPT 8 |
| 164 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ | 172 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ |
| 173 | #define SYS_F_OPENDIR 10 | ||
| 165 | 174 | ||
| 166 | #define ERR_R_FATAL 32 | 175 | #define ERR_R_FATAL 32 |
| 167 | /* reasons */ | 176 | /* reasons */ |
| @@ -187,41 +196,47 @@ typedef struct err_state_st | |||
| 187 | #define ERR_R_PROXY_LIB ERR_LIB_PROXY | 196 | #define ERR_R_PROXY_LIB ERR_LIB_PROXY |
| 188 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 197 | #define ERR_R_BIO_LIB ERR_LIB_BIO |
| 189 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 | 198 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 |
| 199 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 | ||
| 190 | 200 | ||
| 191 | /* fatal error */ | 201 | /* fatal error */ |
| 192 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) | 202 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) |
| 193 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) | 203 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) |
| 194 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) | 204 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) |
| 205 | #define ERR_R_NESTED_ASN1_ERROR (4) | ||
| 206 | #define ERR_R_BAD_ASN1_OBJECT_HEADER (5) | ||
| 207 | #define ERR_R_BAD_GET_ASN1_OBJECT_CALL (6) | ||
| 208 | #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE (7) | ||
| 209 | #define ERR_R_ASN1_LENGTH_MISMATCH (8) | ||
| 210 | #define ERR_R_MISSING_ASN1_EOS (9) | ||
| 195 | 211 | ||
| 196 | typedef struct ERR_string_data_st | 212 | typedef struct ERR_string_data_st |
| 197 | { | 213 | { |
| 198 | unsigned long error; | 214 | unsigned long error; |
| 199 | char *string; | 215 | const char *string; |
| 200 | } ERR_STRING_DATA; | 216 | } ERR_STRING_DATA; |
| 201 | 217 | ||
| 202 | #ifndef NOPROTO | 218 | void ERR_put_error(int lib, int func,int reason,const char *file,int line); |
| 203 | void ERR_put_error(int lib, int func,int reason,char *file,int line); | ||
| 204 | void ERR_set_error_data(char *data,int flags); | 219 | void ERR_set_error_data(char *data,int flags); |
| 205 | 220 | ||
| 206 | unsigned long ERR_get_error(void ); | 221 | unsigned long ERR_get_error(void ); |
| 207 | unsigned long ERR_get_error_line(char **file,int *line); | 222 | unsigned long ERR_get_error_line(const char **file,int *line); |
| 208 | unsigned long ERR_get_error_line_data(char **file,int *line, | 223 | unsigned long ERR_get_error_line_data(const char **file,int *line, |
| 209 | char **data, int *flags); | 224 | const char **data, int *flags); |
| 210 | unsigned long ERR_peek_error(void ); | 225 | unsigned long ERR_peek_error(void ); |
| 211 | unsigned long ERR_peek_error_line(char **file,int *line); | 226 | unsigned long ERR_peek_error_line(const char **file,int *line); |
| 212 | unsigned long ERR_peek_error_line_data(char **file,int *line, | 227 | unsigned long ERR_peek_error_line_data(const char **file,int *line, |
| 213 | char **data,int *flags); | 228 | const char **data,int *flags); |
| 214 | void ERR_clear_error(void ); | 229 | void ERR_clear_error(void ); |
| 215 | char *ERR_error_string(unsigned long e,char *buf); | 230 | char *ERR_error_string(unsigned long e,char *buf); |
| 216 | char *ERR_lib_error_string(unsigned long e); | 231 | const char *ERR_lib_error_string(unsigned long e); |
| 217 | char *ERR_func_error_string(unsigned long e); | 232 | const char *ERR_func_error_string(unsigned long e); |
| 218 | char *ERR_reason_error_string(unsigned long e); | 233 | const char *ERR_reason_error_string(unsigned long e); |
| 219 | #ifndef NO_FP_API | 234 | #ifndef NO_FP_API |
| 220 | void ERR_print_errors_fp(FILE *fp); | 235 | void ERR_print_errors_fp(FILE *fp); |
| 221 | #endif | 236 | #endif |
| 222 | #ifdef HEADER_BIO_H | 237 | #ifdef HEADER_BIO_H |
| 223 | void ERR_print_errors(BIO *bp); | 238 | void ERR_print_errors(BIO *bp); |
| 224 | void ERR_add_error_data( VAR_PLIST( int, num ) ); | 239 | void ERR_add_error_data(int num, ...); |
| 225 | #endif | 240 | #endif |
| 226 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); | 241 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); |
| 227 | void ERR_load_ERR_strings(void ); | 242 | void ERR_load_ERR_strings(void ); |
| @@ -241,45 +256,6 @@ char *ERR_get_err_state_table(void ); | |||
| 241 | 256 | ||
| 242 | int ERR_get_next_error_library(void ); | 257 | int ERR_get_next_error_library(void ); |
| 243 | 258 | ||
| 244 | #else | ||
| 245 | |||
| 246 | void ERR_put_error(); | ||
| 247 | void ERR_set_error_data(); | ||
| 248 | |||
| 249 | unsigned long ERR_get_error(); | ||
| 250 | unsigned long ERR_get_error_line(); | ||
| 251 | unsigned long ERR_peek_error(); | ||
| 252 | unsigned long ERR_peek_error_line(); | ||
| 253 | void ERR_clear_error(); | ||
| 254 | char *ERR_error_string(); | ||
| 255 | char *ERR_lib_error_string(); | ||
| 256 | char *ERR_func_error_string(); | ||
| 257 | char *ERR_reason_error_string(); | ||
| 258 | #ifndef NO_FP_API | ||
| 259 | void ERR_print_errors_fp(); | ||
| 260 | #endif | ||
| 261 | void ERR_print_errors(); | ||
| 262 | void ERR_add_error_data(); | ||
| 263 | void ERR_load_strings(); | ||
| 264 | void ERR_load_ERR_strings(); | ||
| 265 | void ERR_load_crypto_strings(); | ||
| 266 | void ERR_free_strings(); | ||
| 267 | |||
| 268 | void ERR_remove_state(); | ||
| 269 | ERR_STATE *ERR_get_state(); | ||
| 270 | |||
| 271 | #ifdef HEADER_LHASH_H | ||
| 272 | LHASH *ERR_get_string_table(); | ||
| 273 | LHASH *ERR_get_err_state_table(); | ||
| 274 | #else | ||
| 275 | char *ERR_get_string_table(); | ||
| 276 | char *ERR_get_err_state_table(); | ||
| 277 | #endif | ||
| 278 | |||
| 279 | int ERR_get_next_error_library(); | ||
| 280 | |||
| 281 | #endif | ||
| 282 | |||
| 283 | #ifdef __cplusplus | 259 | #ifdef __cplusplus |
| 284 | } | 260 | } |
| 285 | #endif | 261 | #endif |
