The majority of the OCSP code from CertCo.
[openssl.git] / crypto / err / err.h
index 519a9c5b0913704f1572b12d33913b6461820920..b4ced575df68f14fc46cb76a58673aecd8870519 100644 (file)
 #include <stdlib.h>
 #endif
 
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
+#ifndef NO_LHASH
+#include <openssl/lhash.h>
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -125,6 +132,8 @@ typedef struct err_state_st
 #define ERR_LIB_PKCS12         35
 #define ERR_LIB_RAND           36
 #define ERR_LIB_DSO            37
+#define ERR_LIB_ENGINE         38
+#define ERR_LIB_OCSP            39
 
 #define ERR_LIB_USER           128
 
@@ -154,6 +163,8 @@ typedef struct err_state_st
 #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__)
 #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__)
 #define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),ERR_file_name,__LINE__)
+#define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),ERR_file_name,__LINE__)
+#define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),ERR_file_name,__LINE__)
 
 /* Borland C seems too stupid to be able to shift and do longs in
  * the pre-processor :-( */
@@ -203,6 +214,7 @@ typedef struct err_state_st
 #define ERR_R_PKCS7_LIB        ERR_LIB_PKCS7
 #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12
 #define ERR_R_DSO_LIB  ERR_LIB_DSO
+#define ERR_R_ENGINE_LIB ERR_LIB_ENGINE
 
 /* fatal error */
 #define        ERR_R_MALLOC_FAILURE                    (1|ERR_R_FATAL)
@@ -241,7 +253,7 @@ const char *ERR_reason_error_string(unsigned long e);
 #ifndef NO_FP_API
 void ERR_print_errors_fp(FILE *fp);
 #endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
 void ERR_print_errors(BIO *bp);
 void ERR_add_error_data(int num, ...);
 #endif
@@ -253,7 +265,7 @@ void ERR_free_strings(void);
 void ERR_remove_state(unsigned long pid); /* if zero we look it up */
 ERR_STATE *ERR_get_state(void);
 
-#ifdef HEADER_LHASH_H
+#ifndef NO_LHASH
 LHASH *ERR_get_string_table(void);
 LHASH *ERR_get_err_state_table(void); /* even less thread-safe than
                                       * ERR_get_string_table :-) */