diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/err | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/err')
-rw-r--r-- | src/lib/libcrypto/err/Makefile.ssl | 60 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.c | 185 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.h | 82 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err_all.c | 34 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err_code.pl | 105 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err_genc.pl | 198 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err_prn.c | 20 | ||||
-rw-r--r-- | src/lib/libcrypto/err/error.err | 13 | ||||
-rw-r--r-- | src/lib/libcrypto/err/openssl.ec | 71 | ||||
-rw-r--r-- | src/lib/libcrypto/err/ssleay.ec | 57 |
10 files changed, 266 insertions, 559 deletions
diff --git a/src/lib/libcrypto/err/Makefile.ssl b/src/lib/libcrypto/err/Makefile.ssl index 57c87eb041..e0f5128f43 100644 --- a/src/lib/libcrypto/err/Makefile.ssl +++ b/src/lib/libcrypto/err/Makefile.ssl | |||
@@ -7,9 +7,11 @@ TOP= ../.. | |||
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= -I.. -I../../include | 8 | INCLUDES= -I.. -I../../include |
9 | CFLAG=-g | 9 | CFLAG=-g |
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
10 | INSTALLTOP=/usr/local/ssl | 12 | INSTALLTOP=/usr/local/ssl |
11 | MAKE= make -f Makefile.ssl | 13 | MAKE= make -f Makefile.ssl |
12 | MAKEDEPEND= makedepend -f Makefile.ssl | 14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) |
13 | MAKEFILE= Makefile.ssl | 15 | MAKEFILE= Makefile.ssl |
14 | AR= ar r | 16 | AR= ar r |
15 | 17 | ||
@@ -37,24 +39,23 @@ all: lib | |||
37 | 39 | ||
38 | lib: $(LIBOBJ) | 40 | lib: $(LIBOBJ) |
39 | $(AR) $(LIB) $(LIBOBJ) | 41 | $(AR) $(LIB) $(LIBOBJ) |
40 | sh $(TOP)/util/ranlib.sh $(LIB) | 42 | $(RANLIB) $(LIB) |
41 | @touch lib | 43 | @touch lib |
42 | 44 | ||
43 | files: | 45 | files: |
44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | 46 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO |
45 | 47 | ||
46 | links: | 48 | links: |
47 | /bin/rm -f Makefile | 49 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | 50 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) |
49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | 51 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) |
50 | $(TOP)/util/mklink.sh ../../test $(TEST) | 52 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
52 | 53 | ||
53 | install: | 54 | install: |
54 | @for i in $(EXHEADER) ; \ | 55 | @for i in $(EXHEADER) ; \ |
55 | do \ | 56 | do \ |
56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | 57 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | 58 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
58 | done; | 59 | done; |
59 | 60 | ||
60 | tags: | 61 | tags: |
@@ -66,15 +67,44 @@ lint: | |||
66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 67 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
67 | 68 | ||
68 | depend: | 69 | depend: |
69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | 70 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) |
70 | 71 | ||
71 | dclean: | 72 | dclean: |
72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 73 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
73 | mv -f Makefile.new $(MAKEFILE) | 74 | mv -f Makefile.new $(MAKEFILE) |
74 | 75 | ||
75 | clean: | 76 | clean: |
76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | 77 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
77 | |||
78 | errors: | ||
79 | 78 | ||
80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 79 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
80 | |||
81 | err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
82 | err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | ||
83 | err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
84 | err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
85 | err.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h | ||
86 | err.o: ../cryptlib.h | ||
87 | err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
88 | err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
89 | err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
90 | err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
91 | err_all.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
92 | err_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
93 | err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
94 | err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
95 | err_all.o: ../../include/openssl/md2.h ../../include/openssl/md5.h | ||
96 | err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h | ||
97 | err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
98 | err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | ||
99 | err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
100 | err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
101 | err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
102 | err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
103 | err_all.o: ../../include/openssl/stack.h ../../include/openssl/x509.h | ||
104 | err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
105 | err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
106 | err_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | ||
107 | err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
108 | err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
109 | err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h | ||
110 | err_prn.o: ../cryptlib.h | ||
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 5aef6a1259..8810d838c6 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
@@ -57,34 +57,25 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "lhash.h" | 60 | #include <stdarg.h> |
61 | #include "crypto.h" | 61 | #include <openssl/lhash.h> |
62 | #include <openssl/crypto.h> | ||
62 | #include "cryptlib.h" | 63 | #include "cryptlib.h" |
63 | #include "buffer.h" | 64 | #include <openssl/buffer.h> |
64 | #include "err.h" | 65 | #include <openssl/err.h> |
65 | #include "crypto.h" | 66 | #include <openssl/crypto.h> |
66 | 67 | ||
67 | 68 | ||
68 | static LHASH *error_hash=NULL; | 69 | static LHASH *error_hash=NULL; |
69 | static LHASH *thread_hash=NULL; | 70 | static LHASH *thread_hash=NULL; |
70 | 71 | ||
71 | #ifndef NOPROTO | ||
72 | static unsigned long err_hash(ERR_STRING_DATA *a); | 72 | static unsigned long err_hash(ERR_STRING_DATA *a); |
73 | static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); | 73 | static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); |
74 | static unsigned long pid_hash(ERR_STATE *pid); | 74 | static unsigned long pid_hash(ERR_STATE *pid); |
75 | static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); | 75 | static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); |
76 | static unsigned long get_error_values(int inc,char **file,int *line, | 76 | static unsigned long get_error_values(int inc,const char **file,int *line, |
77 | char **data,int *flags); | 77 | const char **data,int *flags); |
78 | static void ERR_STATE_free(ERR_STATE *s); | 78 | static void ERR_STATE_free(ERR_STATE *s); |
79 | #else | ||
80 | static unsigned long err_hash(); | ||
81 | static int err_cmp(); | ||
82 | static unsigned long pid_hash(); | ||
83 | static int pid_cmp(); | ||
84 | static void ERR_STATE_free(); | ||
85 | ERR_STATE *s; | ||
86 | #endif | ||
87 | |||
88 | #ifndef NO_ERR | 79 | #ifndef NO_ERR |
89 | static ERR_STRING_DATA ERR_str_libraries[]= | 80 | static ERR_STRING_DATA ERR_str_libraries[]= |
90 | { | 81 | { |
@@ -107,6 +98,8 @@ static ERR_STRING_DATA ERR_str_libraries[]= | |||
107 | {ERR_PACK(ERR_LIB_PROXY,0,0) ,"Proxy routines"}, | 98 | {ERR_PACK(ERR_LIB_PROXY,0,0) ,"Proxy routines"}, |
108 | {ERR_PACK(ERR_LIB_BIO,0,0) ,"BIO routines"}, | 99 | {ERR_PACK(ERR_LIB_BIO,0,0) ,"BIO routines"}, |
109 | {ERR_PACK(ERR_LIB_PKCS7,0,0) ,"PKCS7 routines"}, | 100 | {ERR_PACK(ERR_LIB_PKCS7,0,0) ,"PKCS7 routines"}, |
101 | {ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"}, | ||
102 | {ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"}, | ||
110 | {0,NULL}, | 103 | {0,NULL}, |
111 | }; | 104 | }; |
112 | 105 | ||
@@ -123,6 +116,7 @@ static ERR_STRING_DATA ERR_str_functs[]= | |||
123 | #ifdef WINDOWS | 116 | #ifdef WINDOWS |
124 | {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"}, | 117 | {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"}, |
125 | #endif | 118 | #endif |
119 | {ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"}, | ||
126 | {0,NULL}, | 120 | {0,NULL}, |
127 | }; | 121 | }; |
128 | 122 | ||
@@ -146,8 +140,17 @@ static ERR_STRING_DATA ERR_str_reasons[]= | |||
146 | {ERR_R_PROXY_LIB ,"PROXY lib"}, | 140 | {ERR_R_PROXY_LIB ,"PROXY lib"}, |
147 | {ERR_R_BIO_LIB ,"BIO lib"}, | 141 | {ERR_R_BIO_LIB ,"BIO lib"}, |
148 | {ERR_R_PKCS7_LIB ,"PKCS7 lib"}, | 142 | {ERR_R_PKCS7_LIB ,"PKCS7 lib"}, |
143 | {ERR_R_PKCS12_LIB ,"PKCS12 lib"}, | ||
149 | {ERR_R_MALLOC_FAILURE ,"Malloc failure"}, | 144 | {ERR_R_MALLOC_FAILURE ,"Malloc failure"}, |
150 | {ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a fuction you should not call"}, | 145 | {ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a function you should not call"}, |
146 | {ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"}, | ||
147 | {ERR_R_NESTED_ASN1_ERROR ,"nested asn1 error"}, | ||
148 | {ERR_R_BAD_ASN1_OBJECT_HEADER ,"bad asn1 object header"}, | ||
149 | {ERR_R_BAD_GET_ASN1_OBJECT_CALL ,"bad get asn1 object call"}, | ||
150 | {ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"}, | ||
151 | {ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"}, | ||
152 | {ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"}, | ||
153 | |||
151 | {0,NULL}, | 154 | {0,NULL}, |
152 | }; | 155 | }; |
153 | #endif | 156 | #endif |
@@ -161,11 +164,13 @@ static ERR_STRING_DATA ERR_str_reasons[]= | |||
161 | } \ | 164 | } \ |
162 | (p)->err_data_flags[i]=0; | 165 | (p)->err_data_flags[i]=0; |
163 | 166 | ||
164 | static void ERR_STATE_free(s) | 167 | static void ERR_STATE_free(ERR_STATE *s) |
165 | ERR_STATE *s; | ||
166 | { | 168 | { |
167 | int i; | 169 | int i; |
168 | 170 | ||
171 | if(s == NULL) | ||
172 | return; | ||
173 | |||
169 | for (i=0; i<ERR_NUM_ERRORS; i++) | 174 | for (i=0; i<ERR_NUM_ERRORS; i++) |
170 | { | 175 | { |
171 | err_clear_data(s,i); | 176 | err_clear_data(s,i); |
@@ -173,7 +178,7 @@ ERR_STATE *s; | |||
173 | Free(s); | 178 | Free(s); |
174 | } | 179 | } |
175 | 180 | ||
176 | void ERR_load_ERR_strings() | 181 | void ERR_load_ERR_strings(void) |
177 | { | 182 | { |
178 | static int init=1; | 183 | static int init=1; |
179 | 184 | ||
@@ -196,9 +201,7 @@ void ERR_load_ERR_strings() | |||
196 | } | 201 | } |
197 | } | 202 | } |
198 | 203 | ||
199 | void ERR_load_strings(lib,str) | 204 | void ERR_load_strings(int lib, ERR_STRING_DATA *str) |
200 | int lib; | ||
201 | ERR_STRING_DATA *str; | ||
202 | { | 205 | { |
203 | if (error_hash == NULL) | 206 | if (error_hash == NULL) |
204 | { | 207 | { |
@@ -224,7 +227,7 @@ ERR_STRING_DATA *str; | |||
224 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); | 227 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); |
225 | } | 228 | } |
226 | 229 | ||
227 | void ERR_free_strings() | 230 | void ERR_free_strings(void) |
228 | { | 231 | { |
229 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | 232 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); |
230 | 233 | ||
@@ -239,13 +242,30 @@ void ERR_free_strings() | |||
239 | 242 | ||
240 | /********************************************************/ | 243 | /********************************************************/ |
241 | 244 | ||
242 | void ERR_put_error(lib,func,reason,file,line) | 245 | void ERR_put_error(int lib, int func, int reason, const char *file, |
243 | int lib,func,reason; | 246 | int line) |
244 | char *file; | ||
245 | int line; | ||
246 | { | 247 | { |
247 | ERR_STATE *es; | 248 | ERR_STATE *es; |
248 | 249 | ||
250 | #ifdef _OSD_POSIX | ||
251 | /* In the BS2000-OSD POSIX subsystem, the compiler generates | ||
252 | * path names in the form "*POSIX(/etc/passwd)". | ||
253 | * This dirty hack strips them to something sensible. | ||
254 | * @@@ We shouldn't modify a const string, though. | ||
255 | */ | ||
256 | if (strncmp(file,"*POSIX(", sizeof("*POSIX(")-1) == 0) { | ||
257 | char *end; | ||
258 | |||
259 | /* Skip the "*POSIX(" prefix */ | ||
260 | file += sizeof("*POSIX(")-1; | ||
261 | end = &file[strlen(file)-1]; | ||
262 | if (*end == ')') | ||
263 | *end = '\0'; | ||
264 | /* Optional: use the basename of the path only. */ | ||
265 | if ((end = strrchr(file, '/')) != NULL) | ||
266 | file = &end[1]; | ||
267 | } | ||
268 | #endif | ||
249 | es=ERR_get_state(); | 269 | es=ERR_get_state(); |
250 | 270 | ||
251 | es->top=(es->top+1)%ERR_NUM_ERRORS; | 271 | es->top=(es->top+1)%ERR_NUM_ERRORS; |
@@ -257,7 +277,7 @@ int line; | |||
257 | err_clear_data(es,es->top); | 277 | err_clear_data(es,es->top); |
258 | } | 278 | } |
259 | 279 | ||
260 | void ERR_clear_error() | 280 | void ERR_clear_error(void) |
261 | { | 281 | { |
262 | ERR_STATE *es; | 282 | ERR_STATE *es; |
263 | 283 | ||
@@ -277,42 +297,32 @@ void ERR_clear_error() | |||
277 | } | 297 | } |
278 | 298 | ||
279 | 299 | ||
280 | unsigned long ERR_get_error() | 300 | unsigned long ERR_get_error(void) |
281 | { return(get_error_values(1,NULL,NULL,NULL,NULL)); } | 301 | { return(get_error_values(1,NULL,NULL,NULL,NULL)); } |
282 | 302 | ||
283 | unsigned long ERR_get_error_line(file,line) | 303 | unsigned long ERR_get_error_line(const char **file, |
284 | char **file; | 304 | int *line) |
285 | int *line; | ||
286 | { return(get_error_values(1,file,line,NULL,NULL)); } | 305 | { return(get_error_values(1,file,line,NULL,NULL)); } |
287 | 306 | ||
288 | unsigned long ERR_get_error_line_data(file,line,data,flags) | 307 | unsigned long ERR_get_error_line_data(const char **file, int *line, |
289 | char **file; | 308 | const char **data, int *flags) |
290 | int *line; | 309 | { return(get_error_values(1,file,line, |
291 | char **data; | 310 | data,flags)); } |
292 | int *flags; | ||
293 | { return(get_error_values(1,file,line,data,flags)); } | ||
294 | 311 | ||
295 | unsigned long ERR_peek_error() | 312 | unsigned long ERR_peek_error(void) |
296 | { return(get_error_values(0,NULL,NULL,NULL,NULL)); } | 313 | { return(get_error_values(0,NULL,NULL,NULL,NULL)); } |
297 | 314 | ||
298 | unsigned long ERR_peek_error_line(file,line) | 315 | unsigned long ERR_peek_error_line(const char **file, |
299 | char **file; | 316 | int *line) |
300 | int *line; | ||
301 | { return(get_error_values(0,file,line,NULL,NULL)); } | 317 | { return(get_error_values(0,file,line,NULL,NULL)); } |
302 | 318 | ||
303 | unsigned long ERR_peek_error_line_data(file,line,data,flags) | 319 | unsigned long ERR_peek_error_line_data(const char **file, int *line, |
304 | char **file; | 320 | const char **data, int *flags) |
305 | int *line; | 321 | { return(get_error_values(0,file,line, |
306 | char **data; | 322 | data,flags)); } |
307 | int *flags; | 323 | |
308 | { return(get_error_values(0,file,line,data,flags)); } | 324 | static unsigned long get_error_values(int inc, const char **file, int *line, |
309 | 325 | const char **data, int *flags) | |
310 | static unsigned long get_error_values(inc,file,line,data,flags) | ||
311 | int inc; | ||
312 | char **file; | ||
313 | int *line; | ||
314 | char **data; | ||
315 | int *flags; | ||
316 | { | 326 | { |
317 | int i=0; | 327 | int i=0; |
318 | ERR_STATE *es; | 328 | ERR_STATE *es; |
@@ -361,12 +371,10 @@ int *flags; | |||
361 | } | 371 | } |
362 | 372 | ||
363 | /* BAD for multi-threaded, uses a local buffer if ret == NULL */ | 373 | /* BAD for multi-threaded, uses a local buffer if ret == NULL */ |
364 | char *ERR_error_string(e,ret) | 374 | char *ERR_error_string(unsigned long e, char *ret) |
365 | unsigned long e; | ||
366 | char *ret; | ||
367 | { | 375 | { |
368 | static char buf[256]; | 376 | static char buf[256]; |
369 | char *ls,*fs,*rs; | 377 | const char *ls,*fs,*rs; |
370 | unsigned long l,f,r; | 378 | unsigned long l,f,r; |
371 | int i; | 379 | int i; |
372 | 380 | ||
@@ -397,18 +405,17 @@ char *ret; | |||
397 | return(ret); | 405 | return(ret); |
398 | } | 406 | } |
399 | 407 | ||
400 | LHASH *ERR_get_string_table() | 408 | LHASH *ERR_get_string_table(void) |
401 | { | 409 | { |
402 | return(error_hash); | 410 | return(error_hash); |
403 | } | 411 | } |
404 | 412 | ||
405 | LHASH *ERR_get_err_state_table() | 413 | LHASH *ERR_get_err_state_table(void) |
406 | { | 414 | { |
407 | return(thread_hash); | 415 | return(thread_hash); |
408 | } | 416 | } |
409 | 417 | ||
410 | char *ERR_lib_error_string(e) | 418 | const char *ERR_lib_error_string(unsigned long e) |
411 | unsigned long e; | ||
412 | { | 419 | { |
413 | ERR_STRING_DATA d,*p=NULL; | 420 | ERR_STRING_DATA d,*p=NULL; |
414 | unsigned long l; | 421 | unsigned long l; |
@@ -428,8 +435,7 @@ unsigned long e; | |||
428 | return((p == NULL)?NULL:p->string); | 435 | return((p == NULL)?NULL:p->string); |
429 | } | 436 | } |
430 | 437 | ||
431 | char *ERR_func_error_string(e) | 438 | const char *ERR_func_error_string(unsigned long e) |
432 | unsigned long e; | ||
433 | { | 439 | { |
434 | ERR_STRING_DATA d,*p=NULL; | 440 | ERR_STRING_DATA d,*p=NULL; |
435 | unsigned long l,f; | 441 | unsigned long l,f; |
@@ -450,8 +456,7 @@ unsigned long e; | |||
450 | return((p == NULL)?NULL:p->string); | 456 | return((p == NULL)?NULL:p->string); |
451 | } | 457 | } |
452 | 458 | ||
453 | char *ERR_reason_error_string(e) | 459 | const char *ERR_reason_error_string(unsigned long e) |
454 | unsigned long e; | ||
455 | { | 460 | { |
456 | ERR_STRING_DATA d,*p=NULL; | 461 | ERR_STRING_DATA d,*p=NULL; |
457 | unsigned long l,r; | 462 | unsigned long l,r; |
@@ -478,8 +483,7 @@ unsigned long e; | |||
478 | return((p == NULL)?NULL:p->string); | 483 | return((p == NULL)?NULL:p->string); |
479 | } | 484 | } |
480 | 485 | ||
481 | static unsigned long err_hash(a) | 486 | static unsigned long err_hash(ERR_STRING_DATA *a) |
482 | ERR_STRING_DATA *a; | ||
483 | { | 487 | { |
484 | unsigned long ret,l; | 488 | unsigned long ret,l; |
485 | 489 | ||
@@ -488,26 +492,22 @@ ERR_STRING_DATA *a; | |||
488 | return(ret^ret%19*13); | 492 | return(ret^ret%19*13); |
489 | } | 493 | } |
490 | 494 | ||
491 | static int err_cmp(a,b) | 495 | static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) |
492 | ERR_STRING_DATA *a,*b; | ||
493 | { | 496 | { |
494 | return((int)(a->error-b->error)); | 497 | return((int)(a->error-b->error)); |
495 | } | 498 | } |
496 | 499 | ||
497 | static unsigned long pid_hash(a) | 500 | static unsigned long pid_hash(ERR_STATE *a) |
498 | ERR_STATE *a; | ||
499 | { | 501 | { |
500 | return(a->pid*13); | 502 | return(a->pid*13); |
501 | } | 503 | } |
502 | 504 | ||
503 | static int pid_cmp(a,b) | 505 | static int pid_cmp(ERR_STATE *a, ERR_STATE *b) |
504 | ERR_STATE *a,*b; | ||
505 | { | 506 | { |
506 | return((int)((long)a->pid - (long)b->pid)); | 507 | return((int)((long)a->pid - (long)b->pid)); |
507 | } | 508 | } |
508 | 509 | ||
509 | void ERR_remove_state(pid) | 510 | void ERR_remove_state(unsigned long pid) |
510 | unsigned long pid; | ||
511 | { | 511 | { |
512 | ERR_STATE *p,tmp; | 512 | ERR_STATE *p,tmp; |
513 | 513 | ||
@@ -523,7 +523,7 @@ unsigned long pid; | |||
523 | if (p != NULL) ERR_STATE_free(p); | 523 | if (p != NULL) ERR_STATE_free(p); |
524 | } | 524 | } |
525 | 525 | ||
526 | ERR_STATE *ERR_get_state() | 526 | ERR_STATE *ERR_get_state(void) |
527 | { | 527 | { |
528 | static ERR_STATE fallback; | 528 | static ERR_STATE fallback; |
529 | ERR_STATE *ret=NULL,tmp,*tmpp; | 529 | ERR_STATE *ret=NULL,tmp,*tmpp; |
@@ -539,7 +539,9 @@ ERR_STATE *ERR_get_state() | |||
539 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | 539 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); |
540 | if (thread_hash == NULL) | 540 | if (thread_hash == NULL) |
541 | { | 541 | { |
542 | MemCheck_off(); | ||
542 | thread_hash=lh_new(pid_hash,pid_cmp); | 543 | thread_hash=lh_new(pid_hash,pid_cmp); |
544 | MemCheck_on(); | ||
543 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | 545 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); |
544 | if (thread_hash == NULL) return(&fallback); | 546 | if (thread_hash == NULL) return(&fallback); |
545 | } | 547 | } |
@@ -577,16 +579,14 @@ ERR_STATE *ERR_get_state() | |||
577 | return(ret); | 579 | return(ret); |
578 | } | 580 | } |
579 | 581 | ||
580 | int ERR_get_next_error_library() | 582 | int ERR_get_next_error_library(void) |
581 | { | 583 | { |
582 | static int value=ERR_LIB_USER; | 584 | static int value=ERR_LIB_USER; |
583 | 585 | ||
584 | return(value++); | 586 | return(value++); |
585 | } | 587 | } |
586 | 588 | ||
587 | void ERR_set_error_data(data,flags) | 589 | void ERR_set_error_data(char *data, int flags) |
588 | char *data; | ||
589 | int flags; | ||
590 | { | 590 | { |
591 | ERR_STATE *es; | 591 | ERR_STATE *es; |
592 | int i; | 592 | int i; |
@@ -601,10 +601,9 @@ int flags; | |||
601 | es->err_data_flags[es->top]=flags; | 601 | es->err_data_flags[es->top]=flags; |
602 | } | 602 | } |
603 | 603 | ||
604 | void ERR_add_error_data( VAR_PLIST(int , num)) | 604 | void ERR_add_error_data(int num, ...) |
605 | VAR_ALIST | 605 | { |
606 | { | 606 | va_list args; |
607 | VAR_BDEFN(args, int, num); | ||
608 | int i,n,s; | 607 | int i,n,s; |
609 | char *str,*p,*a; | 608 | char *str,*p,*a; |
610 | 609 | ||
@@ -613,12 +612,14 @@ VAR_ALIST | |||
613 | if (str == NULL) return; | 612 | if (str == NULL) return; |
614 | str[0]='\0'; | 613 | str[0]='\0'; |
615 | 614 | ||
616 | VAR_INIT(args,int,num); | 615 | va_start(args, num); |
617 | n=0; | 616 | n=0; |
618 | for (i=0; i<num; i++) | 617 | for (i=0; i<num; i++) |
619 | { | 618 | { |
620 | VAR_ARG(args,char *,a); | 619 | a=va_arg(args, char*); |
621 | if (a != NULL) { | 620 | /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */ |
621 | if (a != NULL) | ||
622 | { | ||
622 | n+=strlen(a); | 623 | n+=strlen(a); |
623 | if (n > s) | 624 | if (n > s) |
624 | { | 625 | { |
@@ -637,6 +638,6 @@ VAR_ALIST | |||
637 | } | 638 | } |
638 | ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); | 639 | ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); |
639 | 640 | ||
640 | VAR_END( args ); | 641 | va_end(args); |
641 | } | 642 | } |
642 | 643 | ||
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index 75f931be11..9411fb3568 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
@@ -63,6 +63,10 @@ | |||
63 | extern "C" { | 63 | extern "C" { |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifndef NO_FP_API | ||
67 | #include <stdio.h> | ||
68 | #endif | ||
69 | |||
66 | /* The following is a bit of a trick to help the object files only contain | 70 | /* The following is a bit of a trick to help the object files only contain |
67 | * the 'name of the file' string once. Since 'err.h' is protected by the | 71 | * the 'name of the file' string once. Since 'err.h' is protected by the |
68 | * HEADER_ERR_H stuff, this should be included only once per file. */ | 72 | * HEADER_ERR_H stuff, this should be included only once per file. */ |
@@ -87,7 +91,7 @@ typedef struct err_state_st | |||
87 | unsigned long err_buffer[ERR_NUM_ERRORS]; | 91 | unsigned long err_buffer[ERR_NUM_ERRORS]; |
88 | char *err_data[ERR_NUM_ERRORS]; | 92 | char *err_data[ERR_NUM_ERRORS]; |
89 | int err_data_flags[ERR_NUM_ERRORS]; | 93 | int err_data_flags[ERR_NUM_ERRORS]; |
90 | char *err_file[ERR_NUM_ERRORS]; | 94 | const char *err_file[ERR_NUM_ERRORS]; |
91 | int err_line[ERR_NUM_ERRORS]; | 95 | int err_line[ERR_NUM_ERRORS]; |
92 | int top,bottom; | 96 | int top,bottom; |
93 | } ERR_STATE; | 97 | } ERR_STATE; |
@@ -116,6 +120,8 @@ typedef struct err_state_st | |||
116 | #define ERR_LIB_PROXY 31 | 120 | #define ERR_LIB_PROXY 31 |
117 | #define ERR_LIB_BIO 32 | 121 | #define ERR_LIB_BIO 32 |
118 | #define ERR_LIB_PKCS7 33 | 122 | #define ERR_LIB_PKCS7 33 |
123 | #define ERR_LIB_X509V3 34 | ||
124 | #define ERR_LIB_PKCS12 35 | ||
119 | 125 | ||
120 | #define ERR_LIB_USER 128 | 126 | #define ERR_LIB_USER 128 |
121 | 127 | ||
@@ -141,6 +147,8 @@ typedef struct err_state_st | |||
141 | #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__) | 147 | #define RSAREFerr(f,r) ERR_PUT_error(ERR_LIB_RSAREF,(f),(r),ERR_file_name,__LINE__) |
142 | #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__) | 148 | #define PROXYerr(f,r) ERR_PUT_error(ERR_LIB_PROXY,(f),(r),ERR_file_name,__LINE__) |
143 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) | 149 | #define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) |
150 | #define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),ERR_file_name,__LINE__) | ||
151 | #define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__) | ||
144 | 152 | ||
145 | /* Borland C seems too stupid to be able to shift and do longs in | 153 | /* Borland C seems too stupid to be able to shift and do longs in |
146 | * the pre-processor :-( */ | 154 | * the pre-processor :-( */ |
@@ -162,6 +170,7 @@ typedef struct err_state_st | |||
162 | #define SYS_F_LISTEN 7 | 170 | #define SYS_F_LISTEN 7 |
163 | #define SYS_F_ACCEPT 8 | 171 | #define SYS_F_ACCEPT 8 |
164 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ | 172 | #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ |
173 | #define SYS_F_OPENDIR 10 | ||
165 | 174 | ||
166 | #define ERR_R_FATAL 32 | 175 | #define ERR_R_FATAL 32 |
167 | /* reasons */ | 176 | /* reasons */ |
@@ -187,41 +196,47 @@ typedef struct err_state_st | |||
187 | #define ERR_R_PROXY_LIB ERR_LIB_PROXY | 196 | #define ERR_R_PROXY_LIB ERR_LIB_PROXY |
188 | #define ERR_R_BIO_LIB ERR_LIB_BIO | 197 | #define ERR_R_BIO_LIB ERR_LIB_BIO |
189 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 | 198 | #define ERR_R_PKCS7_LIB ERR_LIB_PKCS7 |
199 | #define ERR_R_PKCS12_LIB ERR_LIB_PKCS12 | ||
190 | 200 | ||
191 | /* fatal error */ | 201 | /* fatal error */ |
192 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) | 202 | #define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) |
193 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) | 203 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) |
194 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) | 204 | #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) |
205 | #define ERR_R_NESTED_ASN1_ERROR (4) | ||
206 | #define ERR_R_BAD_ASN1_OBJECT_HEADER (5) | ||
207 | #define ERR_R_BAD_GET_ASN1_OBJECT_CALL (6) | ||
208 | #define ERR_R_EXPECTING_AN_ASN1_SEQUENCE (7) | ||
209 | #define ERR_R_ASN1_LENGTH_MISMATCH (8) | ||
210 | #define ERR_R_MISSING_ASN1_EOS (9) | ||
195 | 211 | ||
196 | typedef struct ERR_string_data_st | 212 | typedef struct ERR_string_data_st |
197 | { | 213 | { |
198 | unsigned long error; | 214 | unsigned long error; |
199 | char *string; | 215 | const char *string; |
200 | } ERR_STRING_DATA; | 216 | } ERR_STRING_DATA; |
201 | 217 | ||
202 | #ifndef NOPROTO | 218 | void ERR_put_error(int lib, int func,int reason,const char *file,int line); |
203 | void ERR_put_error(int lib, int func,int reason,char *file,int line); | ||
204 | void ERR_set_error_data(char *data,int flags); | 219 | void ERR_set_error_data(char *data,int flags); |
205 | 220 | ||
206 | unsigned long ERR_get_error(void ); | 221 | unsigned long ERR_get_error(void ); |
207 | unsigned long ERR_get_error_line(char **file,int *line); | 222 | unsigned long ERR_get_error_line(const char **file,int *line); |
208 | unsigned long ERR_get_error_line_data(char **file,int *line, | 223 | unsigned long ERR_get_error_line_data(const char **file,int *line, |
209 | char **data, int *flags); | 224 | const char **data, int *flags); |
210 | unsigned long ERR_peek_error(void ); | 225 | unsigned long ERR_peek_error(void ); |
211 | unsigned long ERR_peek_error_line(char **file,int *line); | 226 | unsigned long ERR_peek_error_line(const char **file,int *line); |
212 | unsigned long ERR_peek_error_line_data(char **file,int *line, | 227 | unsigned long ERR_peek_error_line_data(const char **file,int *line, |
213 | char **data,int *flags); | 228 | const char **data,int *flags); |
214 | void ERR_clear_error(void ); | 229 | void ERR_clear_error(void ); |
215 | char *ERR_error_string(unsigned long e,char *buf); | 230 | char *ERR_error_string(unsigned long e,char *buf); |
216 | char *ERR_lib_error_string(unsigned long e); | 231 | const char *ERR_lib_error_string(unsigned long e); |
217 | char *ERR_func_error_string(unsigned long e); | 232 | const char *ERR_func_error_string(unsigned long e); |
218 | char *ERR_reason_error_string(unsigned long e); | 233 | const char *ERR_reason_error_string(unsigned long e); |
219 | #ifndef NO_FP_API | 234 | #ifndef NO_FP_API |
220 | void ERR_print_errors_fp(FILE *fp); | 235 | void ERR_print_errors_fp(FILE *fp); |
221 | #endif | 236 | #endif |
222 | #ifdef HEADER_BIO_H | 237 | #ifdef HEADER_BIO_H |
223 | void ERR_print_errors(BIO *bp); | 238 | void ERR_print_errors(BIO *bp); |
224 | void ERR_add_error_data( VAR_PLIST( int, num ) ); | 239 | void ERR_add_error_data(int num, ...); |
225 | #endif | 240 | #endif |
226 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); | 241 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); |
227 | void ERR_load_ERR_strings(void ); | 242 | void ERR_load_ERR_strings(void ); |
@@ -241,45 +256,6 @@ char *ERR_get_err_state_table(void ); | |||
241 | 256 | ||
242 | int ERR_get_next_error_library(void ); | 257 | int ERR_get_next_error_library(void ); |
243 | 258 | ||
244 | #else | ||
245 | |||
246 | void ERR_put_error(); | ||
247 | void ERR_set_error_data(); | ||
248 | |||
249 | unsigned long ERR_get_error(); | ||
250 | unsigned long ERR_get_error_line(); | ||
251 | unsigned long ERR_peek_error(); | ||
252 | unsigned long ERR_peek_error_line(); | ||
253 | void ERR_clear_error(); | ||
254 | char *ERR_error_string(); | ||
255 | char *ERR_lib_error_string(); | ||
256 | char *ERR_func_error_string(); | ||
257 | char *ERR_reason_error_string(); | ||
258 | #ifndef NO_FP_API | ||
259 | void ERR_print_errors_fp(); | ||
260 | #endif | ||
261 | void ERR_print_errors(); | ||
262 | void ERR_add_error_data(); | ||
263 | void ERR_load_strings(); | ||
264 | void ERR_load_ERR_strings(); | ||
265 | void ERR_load_crypto_strings(); | ||
266 | void ERR_free_strings(); | ||
267 | |||
268 | void ERR_remove_state(); | ||
269 | ERR_STATE *ERR_get_state(); | ||
270 | |||
271 | #ifdef HEADER_LHASH_H | ||
272 | LHASH *ERR_get_string_table(); | ||
273 | LHASH *ERR_get_err_state_table(); | ||
274 | #else | ||
275 | char *ERR_get_string_table(); | ||
276 | char *ERR_get_err_state_table(); | ||
277 | #endif | ||
278 | |||
279 | int ERR_get_next_error_library(); | ||
280 | |||
281 | #endif | ||
282 | |||
283 | #ifdef __cplusplus | 259 | #ifdef __cplusplus |
284 | } | 260 | } |
285 | #endif | 261 | #endif |
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c index f874268e1a..ad820227d2 100644 --- a/src/lib/libcrypto/err/err_all.c +++ b/src/lib/libcrypto/err/err_all.c | |||
@@ -57,30 +57,32 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "asn1.h" | 60 | #include <openssl/asn1.h> |
61 | #include "bn.h" | 61 | #include <openssl/bn.h> |
62 | #include "buffer.h" | 62 | #include <openssl/buffer.h> |
63 | #include "bio.h" | 63 | #include <openssl/bio.h> |
64 | #ifndef NO_RSA | 64 | #ifndef NO_RSA |
65 | #include "rsa.h" | 65 | #include <openssl/rsa.h> |
66 | #endif | 66 | #endif |
67 | #ifdef RSAref | 67 | #ifdef RSAref |
68 | #include "rsaref.h" | 68 | #include <openssl/rsaref.h> |
69 | #endif | 69 | #endif |
70 | #ifndef NO_DH | 70 | #ifndef NO_DH |
71 | #include "dh.h" | 71 | #include <openssl/dh.h> |
72 | #endif | 72 | #endif |
73 | #ifndef NO_DSA | 73 | #ifndef NO_DSA |
74 | #include "dsa.h" | 74 | #include <openssl/dsa.h> |
75 | #endif | 75 | #endif |
76 | #include "evp.h" | 76 | #include <openssl/evp.h> |
77 | #include "objects.h" | 77 | #include <openssl/objects.h> |
78 | #include "pem.h" | 78 | #include <openssl/pem2.h> |
79 | #include "x509.h" | 79 | #include <openssl/x509.h> |
80 | #include "conf.h" | 80 | #include <openssl/x509v3.h> |
81 | #include "err.h" | 81 | #include <openssl/conf.h> |
82 | #include <openssl/pkcs12.h> | ||
83 | #include <openssl/err.h> | ||
82 | 84 | ||
83 | void ERR_load_crypto_strings() | 85 | void ERR_load_crypto_strings(void) |
84 | { | 86 | { |
85 | static int done=0; | 87 | static int done=0; |
86 | 88 | ||
@@ -110,7 +112,9 @@ void ERR_load_crypto_strings() | |||
110 | ERR_load_OBJ_strings(); | 112 | ERR_load_OBJ_strings(); |
111 | ERR_load_PEM_strings(); | 113 | ERR_load_PEM_strings(); |
112 | ERR_load_X509_strings(); | 114 | ERR_load_X509_strings(); |
115 | ERR_load_X509V3_strings(); | ||
113 | ERR_load_CRYPTO_strings(); | 116 | ERR_load_CRYPTO_strings(); |
114 | ERR_load_PKCS7_strings(); | 117 | ERR_load_PKCS7_strings(); |
118 | ERR_load_PKCS12_strings(); | ||
115 | #endif | 119 | #endif |
116 | } | 120 | } |
diff --git a/src/lib/libcrypto/err/err_code.pl b/src/lib/libcrypto/err/err_code.pl deleted file mode 100644 index ebc8eef913..0000000000 --- a/src/lib/libcrypto/err/err_code.pl +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | while (@ARGV) | ||
4 | { | ||
5 | $in=shift(@ARGV); | ||
6 | if ($in =~ /^-conf$/) | ||
7 | { | ||
8 | $in=shift(@ARGV); | ||
9 | open(IN,"<$in") || die "unable to open '$in'\n"; | ||
10 | while (<IN>) | ||
11 | { | ||
12 | s/#.*$//; | ||
13 | s/\s+$//; | ||
14 | next if (/^$/); | ||
15 | if (/^L\s+(\S+)\s+(\S+)$/) | ||
16 | { $errfile{$1}=$2; } | ||
17 | elsif (/^F\s+(\S+)$/) | ||
18 | { $function{$1}=1; } | ||
19 | elsif (/^R\s+(\S+)\s+(\S+)$/) | ||
20 | { $r_value{$1}=$2; } | ||
21 | else { die "bad input line: $in:$.\n"; } | ||
22 | } | ||
23 | close(IN); | ||
24 | next; | ||
25 | } | ||
26 | |||
27 | open(IN,"<$in") || die "unable to open '$in'\n"; | ||
28 | $last=""; | ||
29 | while (<IN>) | ||
30 | { | ||
31 | if (/err\(([A-Z0-9]+_F_[0-9A-Z_]+)\s*,\s*([0-9A-Z]+_R_[0-9A-Z_]+)\s*\)/) | ||
32 | { | ||
33 | if ($1 != $last) | ||
34 | { | ||
35 | if ($function{$1} == 0) | ||
36 | { | ||
37 | printf STDERR "$. $1 is bad\n"; | ||
38 | } | ||
39 | } | ||
40 | $function{$1}++; | ||
41 | $last=$1; | ||
42 | $reason{$2}++; | ||
43 | } | ||
44 | } | ||
45 | close(IN); | ||
46 | } | ||
47 | |||
48 | foreach (keys %function,keys %reason) | ||
49 | { | ||
50 | /^([A-Z0-9]+)_/; | ||
51 | $prefix{$1}++; | ||
52 | } | ||
53 | |||
54 | @F=sort keys %function; | ||
55 | @R=sort keys %reason; | ||
56 | foreach $j (sort keys %prefix) | ||
57 | { | ||
58 | next if $errfile{$j} eq "NONE"; | ||
59 | printf STDERR "doing %-6s - ",$j; | ||
60 | if (defined($errfile{$j})) | ||
61 | { | ||
62 | open(OUT,">$errfile{$j}") || | ||
63 | die "unable to open '$errfile{$j}':$!\n"; | ||
64 | $close_file=1; | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | *OUT=*STDOUT; | ||
69 | $close=0; | ||
70 | } | ||
71 | @f=grep(/^${j}_/,@F); | ||
72 | @r=grep(/^${j}_/,@R); | ||
73 | $num=100; | ||
74 | print OUT "/* Error codes for the $j functions. */\n\n"; | ||
75 | print OUT "/* Function codes. */\n"; | ||
76 | $f_count=0; | ||
77 | foreach $i (@f) | ||
78 | { | ||
79 | $z=6-int(length($i)/8); | ||
80 | printf OUT "#define $i%s $num\n","\t" x $z; | ||
81 | $num++; | ||
82 | $f_count++; | ||
83 | } | ||
84 | $num=100; | ||
85 | print OUT "\n/* Reason codes. */\n"; | ||
86 | $r_count=0; | ||
87 | foreach $i (@r) | ||
88 | { | ||
89 | $z=6-int(length($i)/8); | ||
90 | if (defined($r_value{$i})) | ||
91 | { | ||
92 | printf OUT "#define $i%s $r_value{$i}\n","\t" x $z; | ||
93 | } | ||
94 | else | ||
95 | { | ||
96 | printf OUT "#define $i%s $num\n","\t" x $z; | ||
97 | $num++; | ||
98 | } | ||
99 | $r_count++; | ||
100 | } | ||
101 | close(OUT) if $close_file; | ||
102 | |||
103 | printf STDERR "%3d functions, %3d reasons\n",$f_count,$r_count; | ||
104 | } | ||
105 | |||
diff --git a/src/lib/libcrypto/err/err_genc.pl b/src/lib/libcrypto/err/err_genc.pl deleted file mode 100644 index a8e36c2f0c..0000000000 --- a/src/lib/libcrypto/err/err_genc.pl +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | if ($ARGV[0] eq "-s") { $static=1; shift @ARGV; } | ||
4 | |||
5 | ($#ARGV == 1) || die "usage: $0 [-s] <header file> <output C file>\n"; | ||
6 | open(IN,"<$ARGV[0]") || die "unable to open $ARGV[0]:$!\n"; | ||
7 | open(STDOUT,">$ARGV[1]") || die "unable to open $ARGV[1]:$!\n"; | ||
8 | |||
9 | $Func=0; | ||
10 | $Reas=0; | ||
11 | $fuction{'FOPEN'}='fopen'; | ||
12 | while (<IN>) | ||
13 | { | ||
14 | if (/(\S+)\s*\(\);/) | ||
15 | { | ||
16 | $t=$1; | ||
17 | $t =~ s/\*//; | ||
18 | ($upper=$t) =~ tr/a-z/A-Z/; | ||
19 | $fuction{$upper}=$t; | ||
20 | } | ||
21 | next unless (/^#define\s+(\S+)\s/); | ||
22 | |||
23 | $o=$1; | ||
24 | if ($o =~ /^([^_]+)_F_(.*)/) | ||
25 | { | ||
26 | $type=$1; | ||
27 | $Func++; | ||
28 | $n=$2; | ||
29 | $n=$fuction{$n} if (defined($fuction{$n})); | ||
30 | $out{$1."_str_functs"}.= | ||
31 | sprintf("{ERR_PACK(0,%s,0),\t\"$n\"},\n",$o); | ||
32 | } | ||
33 | elsif ($o =~ /^([^_]+)_R_(.*)/) | ||
34 | { | ||
35 | $type=$1; | ||
36 | $Reas++; | ||
37 | $r=$2; | ||
38 | $r =~ tr/A-Z_/a-z /; | ||
39 | $pkg{$type."_str_reasons"}=$type; | ||
40 | $out{$type."_str_reasons"}.=sprintf("{%-40s,\"$r\"},\n",$o); | ||
41 | } | ||
42 | elsif ($ARGV[0] =~ /rsaref/ && $o =~ /^RE_(.*)/) | ||
43 | { | ||
44 | $type="RSAREF"; | ||
45 | $Reas++; | ||
46 | $r=$1; | ||
47 | $r =~ tr/A-Z_/a-z /; | ||
48 | $pkg{$type."_str_reasons"}=$type; | ||
49 | $out{$type."_str_reasons"}.=sprintf("{%-40s,\"$r\"},\n",$o); | ||
50 | } | ||
51 | } | ||
52 | close(IN); | ||
53 | |||
54 | &header($type,$ARGV[0]); | ||
55 | |||
56 | foreach (sort keys %out) | ||
57 | { | ||
58 | print "static ERR_STRING_DATA ${_}[]=\n\t{\n"; | ||
59 | print $out{$_}; | ||
60 | print "{0,NULL},\n"; | ||
61 | print "\t};\n\n"; | ||
62 | } | ||
63 | print "#endif\n"; | ||
64 | |||
65 | if ($static) | ||
66 | { $lib="ERR_LIB_$type"; } | ||
67 | else | ||
68 | { $lib="${type}_lib_error_code"; } | ||
69 | |||
70 | $str=""; | ||
71 | $str.="#ifndef NO_ERR\n"; | ||
72 | $str.="\t\tERR_load_strings($lib,${type}_str_functs);\n" if $Func; | ||
73 | $str.="\t\tERR_load_strings($lib,${type}_str_reasons);\n" if $Reas; | ||
74 | $str.="#endif\n"; | ||
75 | |||
76 | if (!$static) | ||
77 | { | ||
78 | print <<"EOF"; | ||
79 | |||
80 | static int ${type}_lib_error_code=0; | ||
81 | |||
82 | void ERR_load_${type}_strings() | ||
83 | { | ||
84 | static int init=1; | ||
85 | |||
86 | if (${type}_lib_error_code == 0) | ||
87 | ${type}_lib_error_code=ERR_get_next_error_library(); | ||
88 | |||
89 | if (init); | ||
90 | {; | ||
91 | init=0; | ||
92 | $str | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void ERR_${type}_error(function,reason,file,line) | ||
97 | int function; | ||
98 | int reason; | ||
99 | char *file; | ||
100 | int line; | ||
101 | { | ||
102 | if (${type}_lib_error_code == 0) | ||
103 | ${type}_lib_error_code=ERR_get_next_error_library(); | ||
104 | ERR_PUT_error(${type}_lib_error_code,function,reason,file,line); | ||
105 | } | ||
106 | EOF | ||
107 | } | ||
108 | else # $static | ||
109 | { | ||
110 | print <<"EOF"; | ||
111 | |||
112 | void ERR_load_${type}_strings() | ||
113 | { | ||
114 | static int init=1; | ||
115 | |||
116 | if (init); | ||
117 | {; | ||
118 | init=0; | ||
119 | $str | ||
120 | } | ||
121 | } | ||
122 | EOF | ||
123 | } | ||
124 | |||
125 | sub header | ||
126 | { | ||
127 | ($type,$header)=@_; | ||
128 | |||
129 | ($lc=$type) =~ tr/A-Z/a-z/; | ||
130 | $header =~ s/^.*\///; | ||
131 | |||
132 | print "/* lib/$lc/${lc}\_err.c */\n"; | ||
133 | print <<'EOF'; | ||
134 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
135 | * All rights reserved. | ||
136 | * | ||
137 | * This package is an SSL implementation written | ||
138 | * by Eric Young (eay@cryptsoft.com). | ||
139 | * The implementation was written so as to conform with Netscapes SSL. | ||
140 | * | ||
141 | * This library is free for commercial and non-commercial use as long as | ||
142 | * the following conditions are aheared to. The following conditions | ||
143 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
144 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
145 | * included with this distribution is covered by the same copyright terms | ||
146 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
147 | * | ||
148 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
149 | * the code are not to be removed. | ||
150 | * If this package is used in a product, Eric Young should be given attribution | ||
151 | * as the author of the parts of the library used. | ||
152 | * This can be in the form of a textual message at program startup or | ||
153 | * in documentation (online or textual) provided with the package. | ||
154 | * | ||
155 | * Redistribution and use in source and binary forms, with or without | ||
156 | * modification, are permitted provided that the following conditions | ||
157 | * are met: | ||
158 | * 1. Redistributions of source code must retain the copyright | ||
159 | * notice, this list of conditions and the following disclaimer. | ||
160 | * 2. Redistributions in binary form must reproduce the above copyright | ||
161 | * notice, this list of conditions and the following disclaimer in the | ||
162 | * documentation and/or other materials provided with the distribution. | ||
163 | * 3. All advertising materials mentioning features or use of this software | ||
164 | * must display the following acknowledgement: | ||
165 | * "This product includes cryptographic software written by | ||
166 | * Eric Young (eay@cryptsoft.com)" | ||
167 | * The word 'cryptographic' can be left out if the rouines from the library | ||
168 | * being used are not cryptographic related :-). | ||
169 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
170 | * the apps directory (application code) you must include an acknowledgement: | ||
171 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
172 | * | ||
173 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
174 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
175 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
176 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
177 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
178 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
179 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
180 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
181 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
182 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
183 | * SUCH DAMAGE. | ||
184 | * | ||
185 | * The licence and distribution terms for any publically available version or | ||
186 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
187 | * copied and put under another distribution licence | ||
188 | * [including the GNU Public Licence.] | ||
189 | */ | ||
190 | EOF | ||
191 | |||
192 | print "#include <stdio.h>\n"; | ||
193 | print "#include \"err.h\"\n"; | ||
194 | print "#include \"$header\"\n"; | ||
195 | print "\n/* BEGIN ERROR CODES */\n"; | ||
196 | print "#ifndef NO_ERR\n"; | ||
197 | } | ||
198 | |||
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c index ecd0e7c4fa..0999ff214b 100644 --- a/src/lib/libcrypto/err/err_prn.c +++ b/src/lib/libcrypto/err/err_prn.c | |||
@@ -57,20 +57,19 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "lhash.h" | 60 | #include <openssl/lhash.h> |
61 | #include "crypto.h" | 61 | #include <openssl/crypto.h> |
62 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
63 | #include "buffer.h" | 63 | #include <openssl/buffer.h> |
64 | #include "err.h" | 64 | #include <openssl/err.h> |
65 | #include "crypto.h" | 65 | #include <openssl/crypto.h> |
66 | 66 | ||
67 | #ifndef NO_FP_API | 67 | #ifndef NO_FP_API |
68 | void ERR_print_errors_fp(fp) | 68 | void ERR_print_errors_fp(FILE *fp) |
69 | FILE *fp; | ||
70 | { | 69 | { |
71 | unsigned long l; | 70 | unsigned long l; |
72 | char buf[200]; | 71 | char buf[200]; |
73 | char *file,*data; | 72 | const char *file,*data; |
74 | int line,flags; | 73 | int line,flags; |
75 | unsigned long es; | 74 | unsigned long es; |
76 | 75 | ||
@@ -83,13 +82,12 @@ FILE *fp; | |||
83 | } | 82 | } |
84 | #endif | 83 | #endif |
85 | 84 | ||
86 | void ERR_print_errors(bp) | 85 | void ERR_print_errors(BIO *bp) |
87 | BIO *bp; | ||
88 | { | 86 | { |
89 | unsigned long l; | 87 | unsigned long l; |
90 | char buf[256]; | 88 | char buf[256]; |
91 | char buf2[256]; | 89 | char buf2[256]; |
92 | char *file,*data; | 90 | const char *file,*data; |
93 | int line,flags; | 91 | int line,flags; |
94 | unsigned long es; | 92 | unsigned long es; |
95 | 93 | ||
diff --git a/src/lib/libcrypto/err/error.err b/src/lib/libcrypto/err/error.err deleted file mode 100644 index f09557d8d9..0000000000 --- a/src/lib/libcrypto/err/error.err +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* Error codes for the ERR functions. */ | ||
2 | |||
3 | /* Function codes. */ | ||
4 | |||
5 | /* Reason codes. */ | ||
6 | #define ERR_R_BN_LIB 100 | ||
7 | #define ERR_R_DER_LIB 101 | ||
8 | #define ERR_R_MALLOC_FAILURE 102 | ||
9 | #define ERR_R_PEM_LIB 103 | ||
10 | #define ERR_R_RSA_LIB 104 | ||
11 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED 105 | ||
12 | #define ERR_R_SYS_LIB 106 | ||
13 | #define ERR_R_X509_LIB 107 | ||
diff --git a/src/lib/libcrypto/err/openssl.ec b/src/lib/libcrypto/err/openssl.ec new file mode 100644 index 0000000000..c2a8acff0c --- /dev/null +++ b/src/lib/libcrypto/err/openssl.ec | |||
@@ -0,0 +1,71 @@ | |||
1 | L ERR NONE NONE | ||
2 | L CRYPTO crypto/crypto.h crypto/cpt_err.c | ||
3 | L BN crypto/bn/bn.h crypto/bn/bn_err.c | ||
4 | L RSA crypto/rsa/rsa.h crypto/rsa/rsa_err.c | ||
5 | L DSA crypto/dsa/dsa.h crypto/dsa/dsa_err.c | ||
6 | L DH crypto/dh/dh.h crypto/dh/dh_err.c | ||
7 | L EVP crypto/evp/evp.h crypto/evp/evp_err.c | ||
8 | L BUF crypto/buffer/buffer.h crypto/buffer/buf_err.c | ||
9 | L BIO crypto/bio/bio.h crypto/bio/bio_err.c | ||
10 | L OBJ crypto/objects/objects.h crypto/objects/obj_err.c | ||
11 | L PEM crypto/pem/pem.h crypto/pem/pem_err.c | ||
12 | L X509 crypto/x509/x509.h crypto/x509/x509_err.c | ||
13 | L NONE crypto/x509/x509_vfy.h NONE | ||
14 | L X509V3 crypto/x509v3/x509v3.h crypto/x509v3/v3err.c | ||
15 | #L METH crypto/meth/meth.h crypto/meth/meth_err.c | ||
16 | L ASN1 crypto/asn1/asn1.h crypto/asn1/asn1_err.c | ||
17 | L CONF crypto/conf/conf.h crypto/conf/conf_err.c | ||
18 | #L PROXY crypto/proxy/proxy.h crypto/proxy/proxy_err.c | ||
19 | L PKCS7 crypto/pkcs7/pkcs7.h crypto/pkcs7/pkcs7err.c | ||
20 | L PKCS12 crypto/pkcs12/pkcs12.h crypto/pkcs12/pk12err.c | ||
21 | L RSAREF rsaref/rsaref.h rsaref/rsar_err.c | ||
22 | L SSL ssl/ssl.h ssl/ssl_err.c | ||
23 | L COMP crypto/comp/comp.h crypto/comp/comp_err.c | ||
24 | |||
25 | |||
26 | F RSAREF_F_RSA_BN2BIN | ||
27 | F RSAREF_F_RSA_PRIVATE_DECRYPT | ||
28 | F RSAREF_F_RSA_PRIVATE_ENCRYPT | ||
29 | F RSAREF_F_RSA_PUBLIC_DECRYPT | ||
30 | F RSAREF_F_RSA_PUBLIC_ENCRYPT | ||
31 | #F SSL_F_CLIENT_CERTIFICATE | ||
32 | |||
33 | R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 | ||
34 | R SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 | ||
35 | R SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 | ||
36 | R SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 | ||
37 | R SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 | ||
38 | R SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 | ||
39 | R SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 | ||
40 | R SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 | ||
41 | R SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 | ||
42 | R SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 | ||
43 | R SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 | ||
44 | R SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 | ||
45 | R SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 | ||
46 | R SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 | ||
47 | R SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 | ||
48 | R SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 | ||
49 | R SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 | ||
50 | R SSL_R_TLSV1_ALERT_EXPORT_RESTRICION 1060 | ||
51 | R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 | ||
52 | R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 | ||
53 | R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 | ||
54 | R SSL_R_TLSV1_ALERT_USER_CANCLED 1090 | ||
55 | R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 | ||
56 | |||
57 | R RSAREF_R_CONTENT_ENCODING 0x0400 | ||
58 | R RSAREF_R_DATA 0x0401 | ||
59 | R RSAREF_R_DIGEST_ALGORITHM 0x0402 | ||
60 | R RSAREF_R_ENCODING 0x0403 | ||
61 | R RSAREF_R_KEY 0x0404 | ||
62 | R RSAREF_R_KEY_ENCODING 0x0405 | ||
63 | R RSAREF_R_LEN 0x0406 | ||
64 | R RSAREF_R_MODULUS_LEN 0x0407 | ||
65 | R RSAREF_R_NEED_RANDOM 0x0408 | ||
66 | R RSAREF_R_PRIVATE_KEY 0x0409 | ||
67 | R RSAREF_R_PUBLIC_KEY 0x040a | ||
68 | R RSAREF_R_SIGNATURE 0x040b | ||
69 | R RSAREF_R_SIGNATURE_ENCODING 0x040c | ||
70 | R RSAREF_R_ENCRYPTION_ALGORITHM 0x040d | ||
71 | |||
diff --git a/src/lib/libcrypto/err/ssleay.ec b/src/lib/libcrypto/err/ssleay.ec deleted file mode 100644 index 10b5dbb59d..0000000000 --- a/src/lib/libcrypto/err/ssleay.ec +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | L ERR NONE | ||
2 | L CRYPTO crypto.err | ||
3 | L BN bn/bn.err | ||
4 | L RSA rsa/rsa.err | ||
5 | L DSA dsa/dsa.err | ||
6 | L DH dh/dh.err | ||
7 | L EVP evp/evp.err | ||
8 | L BUF buffer/buffer.err | ||
9 | L BIO bio/bio.err | ||
10 | L OBJ objects/objects.err | ||
11 | L PEM pem/pem.err | ||
12 | L X509 x509/x509.err | ||
13 | L METH meth/meth.err | ||
14 | L ASN1 asn1/asn1.err | ||
15 | L CONF conf/conf.err | ||
16 | L PROXY proxy/proxy.err | ||
17 | L PKCS7 pkcs7/pkcs7.err | ||
18 | L RSAREF ../rsaref/rsaref.err | ||
19 | L SSL ../ssl/ssl.err | ||
20 | L SSL2 ../ssl/ssl2.err | ||
21 | L SSL3 ../ssl/ssl3.err | ||
22 | L SSL23 ../ssl/ssl23.err | ||
23 | |||
24 | F RSAREF_F_RSA_BN2BIN | ||
25 | F RSAREF_F_RSA_PRIVATE_DECRYPT | ||
26 | F RSAREF_F_RSA_PRIVATE_ENCRYPT | ||
27 | F RSAREF_F_RSA_PUBLIC_DECRYPT | ||
28 | F RSAREF_F_RSA_PUBLIC_ENCRYPT | ||
29 | #F SSL_F_CLIENT_CERTIFICATE | ||
30 | |||
31 | R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 | ||
32 | R SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 | ||
33 | R SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 | ||
34 | R SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 | ||
35 | R SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 | ||
36 | R SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 | ||
37 | R SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 | ||
38 | R SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 | ||
39 | R SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 | ||
40 | R SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 | ||
41 | R SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 | ||
42 | |||
43 | R RSAREF_R_CONTENT_ENCODING 0x0400 | ||
44 | R RSAREF_R_DATA 0x0401 | ||
45 | R RSAREF_R_DIGEST_ALGORITHM 0x0402 | ||
46 | R RSAREF_R_ENCODING 0x0403 | ||
47 | R RSAREF_R_KEY 0x0404 | ||
48 | R RSAREF_R_KEY_ENCODING 0x0405 | ||
49 | R RSAREF_R_LEN 0x0406 | ||
50 | R RSAREF_R_MODULUS_LEN 0x0407 | ||
51 | R RSAREF_R_NEED_RANDOM 0x0408 | ||
52 | R RSAREF_R_PRIVATE_KEY 0x0409 | ||
53 | R RSAREF_R_PUBLIC_KEY 0x040a | ||
54 | R RSAREF_R_SIGNATURE 0x040b | ||
55 | R RSAREF_R_SIGNATURE_ENCODING 0x040c | ||
56 | R RSAREF_R_ENCRYPTION_ALGORITHM 0x040d | ||
57 | |||