diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/err/err.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index 2efa18866a..bf28fce492 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
| @@ -59,11 +59,14 @@ | |||
| 59 | #ifndef HEADER_ERR_H | 59 | #ifndef HEADER_ERR_H |
| 60 | #define HEADER_ERR_H | 60 | #define HEADER_ERR_H |
| 61 | 61 | ||
| 62 | #include <openssl/e_os2.h> | ||
| 63 | |||
| 62 | #ifndef OPENSSL_NO_FP_API | 64 | #ifndef OPENSSL_NO_FP_API |
| 63 | #include <stdio.h> | 65 | #include <stdio.h> |
| 64 | #include <stdlib.h> | 66 | #include <stdlib.h> |
| 65 | #endif | 67 | #endif |
| 66 | 68 | ||
| 69 | #include <openssl/ossl_typ.h> | ||
| 67 | #ifndef OPENSSL_NO_BIO | 70 | #ifndef OPENSSL_NO_BIO |
| 68 | #include <openssl/bio.h> | 71 | #include <openssl/bio.h> |
| 69 | #endif | 72 | #endif |
| @@ -86,10 +89,13 @@ extern "C" { | |||
| 86 | #define ERR_TXT_MALLOCED 0x01 | 89 | #define ERR_TXT_MALLOCED 0x01 |
| 87 | #define ERR_TXT_STRING 0x02 | 90 | #define ERR_TXT_STRING 0x02 |
| 88 | 91 | ||
| 92 | #define ERR_FLAG_MARK 0x01 | ||
| 93 | |||
| 89 | #define ERR_NUM_ERRORS 16 | 94 | #define ERR_NUM_ERRORS 16 |
| 90 | typedef struct err_state_st | 95 | typedef struct err_state_st |
| 91 | { | 96 | { |
| 92 | unsigned long pid; | 97 | unsigned long pid; |
| 98 | int err_flags[ERR_NUM_ERRORS]; | ||
| 93 | unsigned long err_buffer[ERR_NUM_ERRORS]; | 99 | unsigned long err_buffer[ERR_NUM_ERRORS]; |
| 94 | char *err_data[ERR_NUM_ERRORS]; | 100 | char *err_data[ERR_NUM_ERRORS]; |
| 95 | int err_data_flags[ERR_NUM_ERRORS]; | 101 | int err_data_flags[ERR_NUM_ERRORS]; |
| @@ -131,7 +137,10 @@ typedef struct err_state_st | |||
| 131 | #define ERR_LIB_OCSP 39 | 137 | #define ERR_LIB_OCSP 39 |
| 132 | #define ERR_LIB_UI 40 | 138 | #define ERR_LIB_UI 40 |
| 133 | #define ERR_LIB_COMP 41 | 139 | #define ERR_LIB_COMP 41 |
| 134 | #define ERR_LIB_FIPS 42 | 140 | #define ERR_LIB_ECDSA 42 |
| 141 | #define ERR_LIB_ECDH 43 | ||
| 142 | #define ERR_LIB_STORE 44 | ||
| 143 | #define ERR_LIB_CMS 45 | ||
| 135 | 144 | ||
| 136 | #define ERR_LIB_USER 128 | 145 | #define ERR_LIB_USER 128 |
| 137 | 146 | ||
| @@ -160,7 +169,10 @@ typedef struct err_state_st | |||
| 160 | #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) | 169 | #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) |
| 161 | #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) | 170 | #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) |
| 162 | #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) | 171 | #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) |
| 163 | #define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) | 172 | #define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__) |
| 173 | #define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__) | ||
| 174 | #define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) | ||
| 175 | #define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) | ||
| 164 | 176 | ||
| 165 | /* Borland C seems too stupid to be able to shift and do longs in | 177 | /* Borland C seems too stupid to be able to shift and do longs in |
| 166 | * the pre-processor :-( */ | 178 | * the pre-processor :-( */ |
| @@ -185,7 +197,6 @@ typedef struct err_state_st | |||
| 185 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ | 197 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ |
| 186 | #define SYS_F_OPENDIR 10 | 198 | #define SYS_F_OPENDIR 10 |
| 187 | #define SYS_F_FREAD 11 | 199 | #define SYS_F_FREAD 11 |
| 188 | #define SYS_F_GETADDRINFO 12 | ||
| 189 | 200 | ||
| 190 | 201 | ||
| 191 | /* reasons */ | 202 | /* reasons */ |
| @@ -214,6 +225,9 @@ typedef struct err_state_st | |||
| 214 | #define ERR_R_OCSP_LIB ERR_LIB_OCSP /* 39 */ | 225 | #define ERR_R_OCSP_LIB ERR_LIB_OCSP /* 39 */ |
| 215 | #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ | 226 | #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ |
| 216 | #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ | 227 | #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ |
| 228 | #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ | ||
| 229 | #define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ | ||
| 230 | #define ERR_R_STORE_LIB ERR_LIB_STORE /* 44 */ | ||
| 217 | 231 | ||
| 218 | #define ERR_R_NESTED_ASN1_ERROR 58 | 232 | #define ERR_R_NESTED_ASN1_ERROR 58 |
| 219 | #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 | 233 | #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 |
| @@ -228,6 +242,7 @@ typedef struct err_state_st | |||
| 228 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) | 242 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) |
| 229 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) | 243 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) |
| 230 | #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) | 244 | #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) |
| 245 | #define ERR_R_DISABLED (5|ERR_R_FATAL) | ||
| 231 | 246 | ||
| 232 | /* 99 is the maximum possible ERR_R_... code, higher values | 247 | /* 99 is the maximum possible ERR_R_... code, higher values |
| 233 | * are reserved for the individual libraries */ | 248 | * are reserved for the individual libraries */ |
| @@ -286,8 +301,11 @@ void ERR_release_err_state_table(LHASH **hash); | |||
| 286 | 301 | ||
| 287 | int ERR_get_next_error_library(void); | 302 | int ERR_get_next_error_library(void); |
| 288 | 303 | ||
| 289 | /* This opaque type encapsulates the low-level error-state functions */ | 304 | int ERR_set_mark(void); |
| 290 | typedef struct st_ERR_FNS ERR_FNS; | 305 | int ERR_pop_to_mark(void); |
| 306 | |||
| 307 | /* Already defined in ossl_typ.h */ | ||
| 308 | /* typedef struct st_ERR_FNS ERR_FNS; */ | ||
| 291 | /* An application can use this function and provide the return value to loaded | 309 | /* An application can use this function and provide the return value to loaded |
| 292 | * modules that should use the application's ERR state/functionality */ | 310 | * modules that should use the application's ERR state/functionality */ |
| 293 | const ERR_FNS *ERR_get_implementation(void); | 311 | const ERR_FNS *ERR_get_implementation(void); |
