summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/err/err.h
diff options
context:
space:
mode:
authorbeck <>2000-12-15 02:58:47 +0000
committerbeck <>2000-12-15 02:58:47 +0000
commit9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch)
tree5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/err/err.h
parente131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff)
downloadopenbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz
openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2
openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/err/err.h')
-rw-r--r--src/lib/libcrypto/err/err.h37
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
63extern "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
75extern "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);
231void ERR_clear_error(void ); 245void ERR_clear_error(void );
232char *ERR_error_string(unsigned long e,char *buf); 246char *ERR_error_string(unsigned long e,char *buf);
247void ERR_error_string_n(unsigned long e, char *buf, size_t len);
233const char *ERR_lib_error_string(unsigned long e); 248const char *ERR_lib_error_string(unsigned long e);
234const char *ERR_func_error_string(unsigned long e); 249const char *ERR_func_error_string(unsigned long e);
235const char *ERR_reason_error_string(unsigned long e); 250const char *ERR_reason_error_string(unsigned long e);
236#ifndef NO_FP_API 251#ifndef NO_FP_API
237void ERR_print_errors_fp(FILE *fp); 252void ERR_print_errors_fp(FILE *fp);
238#endif 253#endif
239#ifdef HEADER_BIO_H 254#ifndef NO_BIO
240void ERR_print_errors(BIO *bp); 255void ERR_print_errors(BIO *bp);
241void ERR_add_error_data(int num, ...); 256void ERR_add_error_data(int num, ...);
242#endif 257#endif
@@ -248,15 +263,13 @@ void ERR_free_strings(void);
248void ERR_remove_state(unsigned long pid); /* if zero we look it up */ 263void ERR_remove_state(unsigned long pid); /* if zero we look it up */
249ERR_STATE *ERR_get_state(void); 264ERR_STATE *ERR_get_state(void);
250 265
251#ifdef HEADER_LHASH_H 266#ifndef NO_LHASH
252LHASH *ERR_get_string_table(void ); 267LHASH *ERR_get_string_table(void);
253LHASH *ERR_get_err_state_table(void ); 268LHASH *ERR_get_err_state_table(void); /* even less thread-safe than
254#else 269 * ERR_get_string_table :-) */
255char *ERR_get_string_table(void );
256char *ERR_get_err_state_table(void );
257#endif 270#endif
258 271
259int ERR_get_next_error_library(void ); 272int ERR_get_next_error_library(void);
260 273
261#ifdef __cplusplus 274#ifdef __cplusplus
262} 275}