Fix const declarations.
[openssl.git] / crypto / err / err.h
index 75f931be112539bd552430e078307c9724a6bbed..52202942daa2bd1271d0859956bdfce3debc3699 100644 (file)
@@ -87,7 +87,7 @@ typedef struct err_state_st
        unsigned long err_buffer[ERR_NUM_ERRORS];
        char *err_data[ERR_NUM_ERRORS];
        int err_data_flags[ERR_NUM_ERRORS];
-       char *err_file[ERR_NUM_ERRORS];
+       const char *err_file[ERR_NUM_ERRORS];
        int err_line[ERR_NUM_ERRORS];
        int top,bottom;
        } ERR_STATE;
@@ -116,6 +116,8 @@ typedef struct err_state_st
 #define ERR_LIB_PROXY          31
 #define ERR_LIB_BIO            32
 #define ERR_LIB_PKCS7          33
+#define ERR_LIB_X509V3         34
+#define ERR_LIB_PKCS12         35
 
 #define ERR_LIB_USER           128
 
@@ -141,6 +143,8 @@ typedef struct err_state_st
 #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__)
 #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__)
 #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__)
+#define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__)
+#define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__)
 
 /* Borland C seems too stupid to be able to shift and do longs in
  * the pre-processor :-( */
@@ -187,35 +191,42 @@ typedef struct err_state_st
 #define ERR_R_PROXY_LIB        ERR_LIB_PROXY
 #define ERR_R_BIO_LIB  ERR_LIB_BIO
 #define ERR_R_PKCS7_LIB        ERR_LIB_PKCS7
+#define ERR_R_PKCS12_LIB ERR_LIB_PKCS12
 
 /* fatal error */
 #define        ERR_R_MALLOC_FAILURE                    (1|ERR_R_FATAL)
 #define        ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED       (2|ERR_R_FATAL)
 #define        ERR_R_PASSED_NULL_PARAMETER             (3|ERR_R_FATAL)
+#define ERR_R_NESTED_ASN1_ERROR                        (4)
+#define ERR_R_BAD_ASN1_OBJECT_HEADER           (5)
+#define ERR_R_BAD_GET_ASN1_OBJECT_CALL         (6)
+#define ERR_R_EXPECTING_AN_ASN1_SEQUENCE       (7)
+#define ERR_R_ASN1_LENGTH_MISMATCH             (8)
+#define ERR_R_MISSING_ASN1_EOS                 (9)
 
 typedef struct ERR_string_data_st
        {
        unsigned long error;
-       char *string;
+       const char *string;
        } ERR_STRING_DATA;
 
 #ifndef NOPROTO
-void ERR_put_error(int lib, int func,int reason,char *file,int line);
+void ERR_put_error(int lib, int func,int reason,const char *file,int line);
 void ERR_set_error_data(char *data,int flags);
 
 unsigned long ERR_get_error(void );
-unsigned long ERR_get_error_line(char **file,int *line);
-unsigned long ERR_get_error_line_data(char **file,int *line,
-               char **data, int *flags);
+unsigned long ERR_get_error_line(const char **file,int *line);
+unsigned long ERR_get_error_line_data(const char **file,int *line,
+                                     const char **data, int *flags);
 unsigned long ERR_peek_error(void );
-unsigned long ERR_peek_error_line(char **file,int *line);
-unsigned long ERR_peek_error_line_data(char **file,int *line,
-               char **data,int *flags);
+unsigned long ERR_peek_error_line(const char **file,int *line);
+unsigned long ERR_peek_error_line_data(const char **file,int *line,
+                                      const char **data,int *flags);
 void ERR_clear_error(void );
 char *ERR_error_string(unsigned long e,char *buf);
-char *ERR_lib_error_string(unsigned long e);
-char *ERR_func_error_string(unsigned long e);
-char *ERR_reason_error_string(unsigned long e);
+const char *ERR_lib_error_string(unsigned long e);
+const char *ERR_func_error_string(unsigned long e);
+const char *ERR_reason_error_string(unsigned long e);
 #ifndef NO_FP_API
 void ERR_print_errors_fp(FILE *fp);
 #endif