xref: /onnv-gate/usr/src/common/openssl/crypto/err/err.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /* crypto/err/err.h */
2*0Sstevel@tonic-gate /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3*0Sstevel@tonic-gate  * All rights reserved.
4*0Sstevel@tonic-gate  *
5*0Sstevel@tonic-gate  * This package is an SSL implementation written
6*0Sstevel@tonic-gate  * by Eric Young (eay@cryptsoft.com).
7*0Sstevel@tonic-gate  * The implementation was written so as to conform with Netscapes SSL.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * This library is free for commercial and non-commercial use as long as
10*0Sstevel@tonic-gate  * the following conditions are aheared to.  The following conditions
11*0Sstevel@tonic-gate  * apply to all code found in this distribution, be it the RC4, RSA,
12*0Sstevel@tonic-gate  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13*0Sstevel@tonic-gate  * included with this distribution is covered by the same copyright terms
14*0Sstevel@tonic-gate  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15*0Sstevel@tonic-gate  *
16*0Sstevel@tonic-gate  * Copyright remains Eric Young's, and as such any Copyright notices in
17*0Sstevel@tonic-gate  * the code are not to be removed.
18*0Sstevel@tonic-gate  * If this package is used in a product, Eric Young should be given attribution
19*0Sstevel@tonic-gate  * as the author of the parts of the library used.
20*0Sstevel@tonic-gate  * This can be in the form of a textual message at program startup or
21*0Sstevel@tonic-gate  * in documentation (online or textual) provided with the package.
22*0Sstevel@tonic-gate  *
23*0Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
24*0Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
25*0Sstevel@tonic-gate  * are met:
26*0Sstevel@tonic-gate  * 1. Redistributions of source code must retain the copyright
27*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
28*0Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
29*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in the
30*0Sstevel@tonic-gate  *    documentation and/or other materials provided with the distribution.
31*0Sstevel@tonic-gate  * 3. All advertising materials mentioning features or use of this software
32*0Sstevel@tonic-gate  *    must display the following acknowledgement:
33*0Sstevel@tonic-gate  *    "This product includes cryptographic software written by
34*0Sstevel@tonic-gate  *     Eric Young (eay@cryptsoft.com)"
35*0Sstevel@tonic-gate  *    The word 'cryptographic' can be left out if the rouines from the library
36*0Sstevel@tonic-gate  *    being used are not cryptographic related :-).
37*0Sstevel@tonic-gate  * 4. If you include any Windows specific code (or a derivative thereof) from
38*0Sstevel@tonic-gate  *    the apps directory (application code) you must include an acknowledgement:
39*0Sstevel@tonic-gate  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40*0Sstevel@tonic-gate  *
41*0Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42*0Sstevel@tonic-gate  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43*0Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44*0Sstevel@tonic-gate  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45*0Sstevel@tonic-gate  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46*0Sstevel@tonic-gate  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47*0Sstevel@tonic-gate  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48*0Sstevel@tonic-gate  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49*0Sstevel@tonic-gate  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50*0Sstevel@tonic-gate  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51*0Sstevel@tonic-gate  * SUCH DAMAGE.
52*0Sstevel@tonic-gate  *
53*0Sstevel@tonic-gate  * The licence and distribution terms for any publically available version or
54*0Sstevel@tonic-gate  * derivative of this code cannot be changed.  i.e. this code cannot simply be
55*0Sstevel@tonic-gate  * copied and put under another distribution licence
56*0Sstevel@tonic-gate  * [including the GNU Public Licence.]
57*0Sstevel@tonic-gate  */
58*0Sstevel@tonic-gate 
59*0Sstevel@tonic-gate #ifndef HEADER_ERR_H
60*0Sstevel@tonic-gate #define HEADER_ERR_H
61*0Sstevel@tonic-gate 
62*0Sstevel@tonic-gate #ifndef OPENSSL_NO_FP_API
63*0Sstevel@tonic-gate #include <stdio.h>
64*0Sstevel@tonic-gate #include <stdlib.h>
65*0Sstevel@tonic-gate #endif
66*0Sstevel@tonic-gate 
67*0Sstevel@tonic-gate #ifndef OPENSSL_NO_BIO
68*0Sstevel@tonic-gate #include <openssl/bio.h>
69*0Sstevel@tonic-gate #endif
70*0Sstevel@tonic-gate #ifndef OPENSSL_NO_LHASH
71*0Sstevel@tonic-gate #include <openssl/lhash.h>
72*0Sstevel@tonic-gate #endif
73*0Sstevel@tonic-gate 
74*0Sstevel@tonic-gate #ifdef	__cplusplus
75*0Sstevel@tonic-gate extern "C" {
76*0Sstevel@tonic-gate #endif
77*0Sstevel@tonic-gate 
78*0Sstevel@tonic-gate #ifndef OPENSSL_NO_ERR
79*0Sstevel@tonic-gate #define ERR_PUT_error(a,b,c,d,e)	ERR_put_error(a,b,c,d,e)
80*0Sstevel@tonic-gate #else
81*0Sstevel@tonic-gate #define ERR_PUT_error(a,b,c,d,e)	ERR_put_error(a,b,c,NULL,0)
82*0Sstevel@tonic-gate #endif
83*0Sstevel@tonic-gate 
84*0Sstevel@tonic-gate #include <errno.h>
85*0Sstevel@tonic-gate 
86*0Sstevel@tonic-gate #define ERR_TXT_MALLOCED	0x01
87*0Sstevel@tonic-gate #define ERR_TXT_STRING		0x02
88*0Sstevel@tonic-gate 
89*0Sstevel@tonic-gate #define ERR_NUM_ERRORS	16
90*0Sstevel@tonic-gate typedef struct err_state_st
91*0Sstevel@tonic-gate 	{
92*0Sstevel@tonic-gate 	unsigned long pid;
93*0Sstevel@tonic-gate 	unsigned long err_buffer[ERR_NUM_ERRORS];
94*0Sstevel@tonic-gate 	char *err_data[ERR_NUM_ERRORS];
95*0Sstevel@tonic-gate 	int err_data_flags[ERR_NUM_ERRORS];
96*0Sstevel@tonic-gate 	const char *err_file[ERR_NUM_ERRORS];
97*0Sstevel@tonic-gate 	int err_line[ERR_NUM_ERRORS];
98*0Sstevel@tonic-gate 	int top,bottom;
99*0Sstevel@tonic-gate 	} ERR_STATE;
100*0Sstevel@tonic-gate 
101*0Sstevel@tonic-gate /* library */
102*0Sstevel@tonic-gate #define ERR_LIB_NONE		1
103*0Sstevel@tonic-gate #define ERR_LIB_SYS		2
104*0Sstevel@tonic-gate #define ERR_LIB_BN		3
105*0Sstevel@tonic-gate #define ERR_LIB_RSA		4
106*0Sstevel@tonic-gate #define ERR_LIB_DH		5
107*0Sstevel@tonic-gate #define ERR_LIB_EVP		6
108*0Sstevel@tonic-gate #define ERR_LIB_BUF		7
109*0Sstevel@tonic-gate #define ERR_LIB_OBJ		8
110*0Sstevel@tonic-gate #define ERR_LIB_PEM		9
111*0Sstevel@tonic-gate #define ERR_LIB_DSA		10
112*0Sstevel@tonic-gate #define ERR_LIB_X509		11
113*0Sstevel@tonic-gate /* #define ERR_LIB_METH         12 */
114*0Sstevel@tonic-gate #define ERR_LIB_ASN1		13
115*0Sstevel@tonic-gate #define ERR_LIB_CONF		14
116*0Sstevel@tonic-gate #define ERR_LIB_CRYPTO		15
117*0Sstevel@tonic-gate #define ERR_LIB_EC		16
118*0Sstevel@tonic-gate #define ERR_LIB_SSL		20
119*0Sstevel@tonic-gate /* #define ERR_LIB_SSL23        21 */
120*0Sstevel@tonic-gate /* #define ERR_LIB_SSL2         22 */
121*0Sstevel@tonic-gate /* #define ERR_LIB_SSL3         23 */
122*0Sstevel@tonic-gate /* #define ERR_LIB_RSAREF       30 */
123*0Sstevel@tonic-gate /* #define ERR_LIB_PROXY        31 */
124*0Sstevel@tonic-gate #define ERR_LIB_BIO		32
125*0Sstevel@tonic-gate #define ERR_LIB_PKCS7		33
126*0Sstevel@tonic-gate #define ERR_LIB_X509V3		34
127*0Sstevel@tonic-gate #define ERR_LIB_PKCS12		35
128*0Sstevel@tonic-gate #define ERR_LIB_RAND		36
129*0Sstevel@tonic-gate #define ERR_LIB_DSO		37
130*0Sstevel@tonic-gate #define ERR_LIB_ENGINE		38
131*0Sstevel@tonic-gate #define ERR_LIB_OCSP            39
132*0Sstevel@tonic-gate #define ERR_LIB_UI              40
133*0Sstevel@tonic-gate #define ERR_LIB_COMP            41
134*0Sstevel@tonic-gate 
135*0Sstevel@tonic-gate #define ERR_LIB_USER		128
136*0Sstevel@tonic-gate 
137*0Sstevel@tonic-gate #define SYSerr(f,r)  ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__)
138*0Sstevel@tonic-gate #define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__)
139*0Sstevel@tonic-gate #define RSAerr(f,r)  ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__)
140*0Sstevel@tonic-gate #define DHerr(f,r)   ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__)
141*0Sstevel@tonic-gate #define EVPerr(f,r)  ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__)
142*0Sstevel@tonic-gate #define BUFerr(f,r)  ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__)
143*0Sstevel@tonic-gate #define OBJerr(f,r)  ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__)
144*0Sstevel@tonic-gate #define PEMerr(f,r)  ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__)
145*0Sstevel@tonic-gate #define DSAerr(f,r)  ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__)
146*0Sstevel@tonic-gate #define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__)
147*0Sstevel@tonic-gate #define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__)
148*0Sstevel@tonic-gate #define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__)
149*0Sstevel@tonic-gate #define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__)
150*0Sstevel@tonic-gate #define ECerr(f,r)   ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__)
151*0Sstevel@tonic-gate #define SSLerr(f,r)  ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__)
152*0Sstevel@tonic-gate #define BIOerr(f,r)  ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__)
153*0Sstevel@tonic-gate #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__)
154*0Sstevel@tonic-gate #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__)
155*0Sstevel@tonic-gate #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__)
156*0Sstevel@tonic-gate #define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__)
157*0Sstevel@tonic-gate #define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__)
158*0Sstevel@tonic-gate #define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__)
159*0Sstevel@tonic-gate #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__)
160*0Sstevel@tonic-gate #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__)
161*0Sstevel@tonic-gate #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__)
162*0Sstevel@tonic-gate 
163*0Sstevel@tonic-gate /* Borland C seems too stupid to be able to shift and do longs in
164*0Sstevel@tonic-gate  * the pre-processor :-( */
165*0Sstevel@tonic-gate #define ERR_PACK(l,f,r)		(((((unsigned long)l)&0xffL)*0x1000000)| \
166*0Sstevel@tonic-gate 				((((unsigned long)f)&0xfffL)*0x1000)| \
167*0Sstevel@tonic-gate 				((((unsigned long)r)&0xfffL)))
168*0Sstevel@tonic-gate #define ERR_GET_LIB(l)		(int)((((unsigned long)l)>>24L)&0xffL)
169*0Sstevel@tonic-gate #define ERR_GET_FUNC(l)		(int)((((unsigned long)l)>>12L)&0xfffL)
170*0Sstevel@tonic-gate #define ERR_GET_REASON(l)	(int)((l)&0xfffL)
171*0Sstevel@tonic-gate #define ERR_FATAL_ERROR(l)	(int)((l)&ERR_R_FATAL)
172*0Sstevel@tonic-gate 
173*0Sstevel@tonic-gate 
174*0Sstevel@tonic-gate /* OS functions */
175*0Sstevel@tonic-gate #define SYS_F_FOPEN		1
176*0Sstevel@tonic-gate #define SYS_F_CONNECT		2
177*0Sstevel@tonic-gate #define SYS_F_GETSERVBYNAME	3
178*0Sstevel@tonic-gate #define SYS_F_SOCKET		4
179*0Sstevel@tonic-gate #define SYS_F_IOCTLSOCKET	5
180*0Sstevel@tonic-gate #define SYS_F_BIND		6
181*0Sstevel@tonic-gate #define SYS_F_LISTEN		7
182*0Sstevel@tonic-gate #define SYS_F_ACCEPT		8
183*0Sstevel@tonic-gate #define SYS_F_WSASTARTUP	9 /* Winsock stuff */
184*0Sstevel@tonic-gate #define SYS_F_OPENDIR		10
185*0Sstevel@tonic-gate #define SYS_F_FREAD		11
186*0Sstevel@tonic-gate 
187*0Sstevel@tonic-gate 
188*0Sstevel@tonic-gate /* reasons */
189*0Sstevel@tonic-gate #define ERR_R_SYS_LIB	ERR_LIB_SYS       /* 2 */
190*0Sstevel@tonic-gate #define ERR_R_BN_LIB	ERR_LIB_BN        /* 3 */
191*0Sstevel@tonic-gate #define ERR_R_RSA_LIB	ERR_LIB_RSA       /* 4 */
192*0Sstevel@tonic-gate #define ERR_R_DH_LIB	ERR_LIB_DH        /* 5 */
193*0Sstevel@tonic-gate #define ERR_R_EVP_LIB	ERR_LIB_EVP       /* 6 */
194*0Sstevel@tonic-gate #define ERR_R_BUF_LIB	ERR_LIB_BUF       /* 7 */
195*0Sstevel@tonic-gate #define ERR_R_OBJ_LIB	ERR_LIB_OBJ       /* 8 */
196*0Sstevel@tonic-gate #define ERR_R_PEM_LIB	ERR_LIB_PEM       /* 9 */
197*0Sstevel@tonic-gate #define ERR_R_DSA_LIB	ERR_LIB_DSA      /* 10 */
198*0Sstevel@tonic-gate #define ERR_R_X509_LIB	ERR_LIB_X509     /* 11 */
199*0Sstevel@tonic-gate #define ERR_R_ASN1_LIB	ERR_LIB_ASN1     /* 13 */
200*0Sstevel@tonic-gate #define ERR_R_CONF_LIB	ERR_LIB_CONF     /* 14 */
201*0Sstevel@tonic-gate #define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO  /* 15 */
202*0Sstevel@tonic-gate #define ERR_R_EC_LIB	ERR_LIB_EC       /* 16 */
203*0Sstevel@tonic-gate #define ERR_R_SSL_LIB	ERR_LIB_SSL      /* 20 */
204*0Sstevel@tonic-gate #define ERR_R_BIO_LIB	ERR_LIB_BIO      /* 32 */
205*0Sstevel@tonic-gate #define ERR_R_PKCS7_LIB	ERR_LIB_PKCS7    /* 33 */
206*0Sstevel@tonic-gate #define ERR_R_X509V3_LIB ERR_LIB_X509V3  /* 34 */
207*0Sstevel@tonic-gate #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12  /* 35 */
208*0Sstevel@tonic-gate #define ERR_R_RAND_LIB	ERR_LIB_RAND     /* 36 */
209*0Sstevel@tonic-gate #define ERR_R_DSO_LIB	ERR_LIB_DSO      /* 37 */
210*0Sstevel@tonic-gate #define ERR_R_ENGINE_LIB ERR_LIB_ENGINE  /* 38 */
211*0Sstevel@tonic-gate #define ERR_R_OCSP_LIB  ERR_LIB_OCSP     /* 39 */
212*0Sstevel@tonic-gate #define ERR_R_UI_LIB    ERR_LIB_UI       /* 40 */
213*0Sstevel@tonic-gate #define ERR_R_COMP_LIB	ERR_LIB_COMP     /* 41 */
214*0Sstevel@tonic-gate 
215*0Sstevel@tonic-gate #define ERR_R_NESTED_ASN1_ERROR			58
216*0Sstevel@tonic-gate #define ERR_R_BAD_ASN1_OBJECT_HEADER		59
217*0Sstevel@tonic-gate #define ERR_R_BAD_GET_ASN1_OBJECT_CALL		60
218*0Sstevel@tonic-gate #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE	61
219*0Sstevel@tonic-gate #define ERR_R_ASN1_LENGTH_MISMATCH		62
220*0Sstevel@tonic-gate #define ERR_R_MISSING_ASN1_EOS			63
221*0Sstevel@tonic-gate 
222*0Sstevel@tonic-gate /* fatal error */
223*0Sstevel@tonic-gate #define ERR_R_FATAL				64
224*0Sstevel@tonic-gate #define	ERR_R_MALLOC_FAILURE			(1|ERR_R_FATAL)
225*0Sstevel@tonic-gate #define	ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED	(2|ERR_R_FATAL)
226*0Sstevel@tonic-gate #define	ERR_R_PASSED_NULL_PARAMETER		(3|ERR_R_FATAL)
227*0Sstevel@tonic-gate #define	ERR_R_INTERNAL_ERROR			(4|ERR_R_FATAL)
228*0Sstevel@tonic-gate 
229*0Sstevel@tonic-gate /* 99 is the maximum possible ERR_R_... code, higher values
230*0Sstevel@tonic-gate  * are reserved for the individual libraries */
231*0Sstevel@tonic-gate 
232*0Sstevel@tonic-gate 
233*0Sstevel@tonic-gate typedef struct ERR_string_data_st
234*0Sstevel@tonic-gate 	{
235*0Sstevel@tonic-gate 	unsigned long error;
236*0Sstevel@tonic-gate 	const char *string;
237*0Sstevel@tonic-gate 	} ERR_STRING_DATA;
238*0Sstevel@tonic-gate 
239*0Sstevel@tonic-gate void ERR_put_error(int lib, int func,int reason,const char *file,int line);
240*0Sstevel@tonic-gate void ERR_set_error_data(char *data,int flags);
241*0Sstevel@tonic-gate 
242*0Sstevel@tonic-gate unsigned long ERR_get_error(void);
243*0Sstevel@tonic-gate unsigned long ERR_get_error_line(const char **file,int *line);
244*0Sstevel@tonic-gate unsigned long ERR_get_error_line_data(const char **file,int *line,
245*0Sstevel@tonic-gate 				      const char **data, int *flags);
246*0Sstevel@tonic-gate unsigned long ERR_peek_error(void);
247*0Sstevel@tonic-gate unsigned long ERR_peek_error_line(const char **file,int *line);
248*0Sstevel@tonic-gate unsigned long ERR_peek_error_line_data(const char **file,int *line,
249*0Sstevel@tonic-gate 				       const char **data,int *flags);
250*0Sstevel@tonic-gate unsigned long ERR_peek_last_error(void);
251*0Sstevel@tonic-gate unsigned long ERR_peek_last_error_line(const char **file,int *line);
252*0Sstevel@tonic-gate unsigned long ERR_peek_last_error_line_data(const char **file,int *line,
253*0Sstevel@tonic-gate 				       const char **data,int *flags);
254*0Sstevel@tonic-gate void ERR_clear_error(void );
255*0Sstevel@tonic-gate char *ERR_error_string(unsigned long e,char *buf);
256*0Sstevel@tonic-gate void ERR_error_string_n(unsigned long e, char *buf, size_t len);
257*0Sstevel@tonic-gate const char *ERR_lib_error_string(unsigned long e);
258*0Sstevel@tonic-gate const char *ERR_func_error_string(unsigned long e);
259*0Sstevel@tonic-gate const char *ERR_reason_error_string(unsigned long e);
260*0Sstevel@tonic-gate void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
261*0Sstevel@tonic-gate 			 void *u);
262*0Sstevel@tonic-gate #ifndef OPENSSL_NO_FP_API
263*0Sstevel@tonic-gate void ERR_print_errors_fp(FILE *fp);
264*0Sstevel@tonic-gate #endif
265*0Sstevel@tonic-gate #ifndef OPENSSL_NO_BIO
266*0Sstevel@tonic-gate void ERR_print_errors(BIO *bp);
267*0Sstevel@tonic-gate void ERR_add_error_data(int num, ...);
268*0Sstevel@tonic-gate #endif
269*0Sstevel@tonic-gate void ERR_load_strings(int lib,ERR_STRING_DATA str[]);
270*0Sstevel@tonic-gate void ERR_unload_strings(int lib,ERR_STRING_DATA str[]);
271*0Sstevel@tonic-gate void ERR_load_ERR_strings(void);
272*0Sstevel@tonic-gate void ERR_load_crypto_strings(void);
273*0Sstevel@tonic-gate void ERR_free_strings(void);
274*0Sstevel@tonic-gate 
275*0Sstevel@tonic-gate void ERR_remove_state(unsigned long pid); /* if zero we look it up */
276*0Sstevel@tonic-gate ERR_STATE *ERR_get_state(void);
277*0Sstevel@tonic-gate 
278*0Sstevel@tonic-gate #ifndef OPENSSL_NO_LHASH
279*0Sstevel@tonic-gate LHASH *ERR_get_string_table(void);
280*0Sstevel@tonic-gate LHASH *ERR_get_err_state_table(void);
281*0Sstevel@tonic-gate void ERR_release_err_state_table(LHASH **hash);
282*0Sstevel@tonic-gate #endif
283*0Sstevel@tonic-gate 
284*0Sstevel@tonic-gate int ERR_get_next_error_library(void);
285*0Sstevel@tonic-gate 
286*0Sstevel@tonic-gate /* This opaque type encapsulates the low-level error-state functions */
287*0Sstevel@tonic-gate typedef struct st_ERR_FNS ERR_FNS;
288*0Sstevel@tonic-gate /* An application can use this function and provide the return value to loaded
289*0Sstevel@tonic-gate  * modules that should use the application's ERR state/functionality */
290*0Sstevel@tonic-gate const ERR_FNS *ERR_get_implementation(void);
291*0Sstevel@tonic-gate /* A loaded module should call this function prior to any ERR operations using
292*0Sstevel@tonic-gate  * the application's "ERR_FNS". */
293*0Sstevel@tonic-gate int ERR_set_implementation(const ERR_FNS *fns);
294*0Sstevel@tonic-gate 
295*0Sstevel@tonic-gate #ifdef	__cplusplus
296*0Sstevel@tonic-gate }
297*0Sstevel@tonic-gate #endif
298*0Sstevel@tonic-gate 
299*0Sstevel@tonic-gate #endif
300