summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/err
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/err')
-rw-r--r--src/lib/libcrypto/err/Makefile.ssl21
-rw-r--r--src/lib/libcrypto/err/err.c20
-rw-r--r--src/lib/libcrypto/err/err.h10
-rw-r--r--src/lib/libcrypto/err/err_all.c2
-rw-r--r--src/lib/libcrypto/err/openssl.ec5
5 files changed, 32 insertions, 26 deletions
diff --git a/src/lib/libcrypto/err/Makefile.ssl b/src/lib/libcrypto/err/Makefile.ssl
index ae827edddb..fb74e4eb13 100644
--- a/src/lib/libcrypto/err/Makefile.ssl
+++ b/src/lib/libcrypto/err/Makefile.ssl
@@ -82,8 +82,8 @@ err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
82err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h 82err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
83err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 83err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
84err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 84err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
85err.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h 85err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
86err.o: ../cryptlib.h 86err.o: ../../include/openssl/stack.h ../cryptlib.h
87err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 87err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
88err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 88err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
89err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 89err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -96,15 +96,16 @@ err_all.o: ../../include/openssl/md2.h ../../include/openssl/md5.h
96err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h 96err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h
97err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 97err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
98err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h 98err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
99err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h 99err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
100err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 100err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
101err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 101err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
102err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 102err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
103err_all.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 103err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
104err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h 104err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
105err_all.o: ../../include/openssl/x509v3.h
105err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 106err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
106err_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h 107err_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
107err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 108err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
108err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 109err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
109err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h 110err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
110err_prn.o: ../cryptlib.h 111err_prn.o: ../../include/openssl/stack.h ../cryptlib.h
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index 8810d838c6..93c64cbc4f 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -91,7 +91,7 @@ static ERR_STRING_DATA ERR_str_libraries[]=
91{ERR_PACK(ERR_LIB_PEM,0,0) ,"PEM routines"}, 91{ERR_PACK(ERR_LIB_PEM,0,0) ,"PEM routines"},
92{ERR_PACK(ERR_LIB_ASN1,0,0) ,"asn1 encoding routines"}, 92{ERR_PACK(ERR_LIB_ASN1,0,0) ,"asn1 encoding routines"},
93{ERR_PACK(ERR_LIB_X509,0,0) ,"x509 certificate routines"}, 93{ERR_PACK(ERR_LIB_X509,0,0) ,"x509 certificate routines"},
94{ERR_PACK(ERR_LIB_CONF,0,0) ,"configuation file routines"}, 94{ERR_PACK(ERR_LIB_CONF,0,0) ,"configuration file routines"},
95{ERR_PACK(ERR_LIB_METH,0,0) ,"X509 lookup 'method' routines"}, 95{ERR_PACK(ERR_LIB_METH,0,0) ,"X509 lookup 'method' routines"},
96{ERR_PACK(ERR_LIB_SSL,0,0) ,"SSL routines"}, 96{ERR_PACK(ERR_LIB_SSL,0,0) ,"SSL routines"},
97{ERR_PACK(ERR_LIB_RSAREF,0,0) ,"RSAref routines"}, 97{ERR_PACK(ERR_LIB_RSAREF,0,0) ,"RSAref routines"},
@@ -100,6 +100,7 @@ static ERR_STRING_DATA ERR_str_libraries[]=
100{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"}, 101{ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"},
102{ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"}, 102{ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"},
103{ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"},
103{0,NULL}, 104{0,NULL},
104 }; 105 };
105 106
@@ -221,7 +222,7 @@ void ERR_load_strings(int lib, ERR_STRING_DATA *str)
221 while (str->error) 222 while (str->error)
222 { 223 {
223 str->error|=ERR_PACK(lib,0,0); 224 str->error|=ERR_PACK(lib,0,0);
224 lh_insert(error_hash,(char *)str); 225 lh_insert(error_hash,str);
225 str++; 226 str++;
226 } 227 }
227 CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH); 228 CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH);
@@ -427,7 +428,7 @@ const char *ERR_lib_error_string(unsigned long e)
427 if (error_hash != NULL) 428 if (error_hash != NULL)
428 { 429 {
429 d.error=ERR_PACK(l,0,0); 430 d.error=ERR_PACK(l,0,0);
430 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d); 431 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
431 } 432 }
432 433
433 CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH); 434 CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH);
@@ -448,7 +449,7 @@ const char *ERR_func_error_string(unsigned long e)
448 if (error_hash != NULL) 449 if (error_hash != NULL)
449 { 450 {
450 d.error=ERR_PACK(l,f,0); 451 d.error=ERR_PACK(l,f,0);
451 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d); 452 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
452 } 453 }
453 454
454 CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH); 455 CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH);
@@ -469,12 +470,11 @@ const char *ERR_reason_error_string(unsigned long e)
469 if (error_hash != NULL) 470 if (error_hash != NULL)
470 { 471 {
471 d.error=ERR_PACK(l,0,r); 472 d.error=ERR_PACK(l,0,r);
472 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d); 473 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
473 if (p == NULL) 474 if (p == NULL)
474 { 475 {
475 d.error=ERR_PACK(0,0,r); 476 d.error=ERR_PACK(0,0,r);
476 p=(ERR_STRING_DATA *)lh_retrieve(error_hash, 477 p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
477 (char *)&d);
478 } 478 }
479 } 479 }
480 480
@@ -517,7 +517,7 @@ void ERR_remove_state(unsigned long pid)
517 pid=(unsigned long)CRYPTO_thread_id(); 517 pid=(unsigned long)CRYPTO_thread_id();
518 tmp.pid=pid; 518 tmp.pid=pid;
519 CRYPTO_w_lock(CRYPTO_LOCK_ERR); 519 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
520 p=(ERR_STATE *)lh_delete(thread_hash,(char *)&tmp); 520 p=(ERR_STATE *)lh_delete(thread_hash,&tmp);
521 CRYPTO_w_unlock(CRYPTO_LOCK_ERR); 521 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
522 522
523 if (p != NULL) ERR_STATE_free(p); 523 if (p != NULL) ERR_STATE_free(p);
@@ -551,7 +551,7 @@ ERR_STATE *ERR_get_state(void)
551 else 551 else
552 { 552 {
553 tmp.pid=pid; 553 tmp.pid=pid;
554 ret=(ERR_STATE *)lh_retrieve(thread_hash,(char *)&tmp); 554 ret=(ERR_STATE *)lh_retrieve(thread_hash,&tmp);
555 CRYPTO_r_unlock(CRYPTO_LOCK_ERR); 555 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
556 } 556 }
557 557
@@ -569,7 +569,7 @@ ERR_STATE *ERR_get_state(void)
569 ret->err_data_flags[i]=0; 569 ret->err_data_flags[i]=0;
570 } 570 }
571 CRYPTO_w_lock(CRYPTO_LOCK_ERR); 571 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
572 tmpp=(ERR_STATE *)lh_insert(thread_hash,(char *)ret); 572 tmpp=(ERR_STATE *)lh_insert(thread_hash,ret);
573 CRYPTO_w_unlock(CRYPTO_LOCK_ERR); 573 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
574 if (tmpp != NULL) /* old entry - should not happen */ 574 if (tmpp != NULL) /* old entry - should not happen */
575 { 575 {
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h
index 9411fb3568..15bafbff43 100644
--- a/src/lib/libcrypto/err/err.h
+++ b/src/lib/libcrypto/err/err.h
@@ -122,6 +122,7 @@ typedef struct err_state_st
122#define ERR_LIB_PKCS7 33 122#define ERR_LIB_PKCS7 33
123#define ERR_LIB_X509V3 34 123#define ERR_LIB_X509V3 34
124#define ERR_LIB_PKCS12 35 124#define ERR_LIB_PKCS12 35
125#define ERR_LIB_RAND 36
125 126
126#define ERR_LIB_USER 128 127#define ERR_LIB_USER 128
127 128
@@ -149,6 +150,7 @@ typedef struct err_state_st
149#define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),ERR_file_name,__LINE__) 150#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 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__) 152#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__)
152 154
153/* Borland C seems too stupid to be able to shift and do longs in 155/* Borland C seems too stupid to be able to shift and do longs in
154 * the pre-processor :-( */ 156 * the pre-processor :-( */
@@ -160,7 +162,7 @@ typedef struct err_state_st
160#define ERR_GET_REASON(l) (int)((l)&0xfffL) 162#define ERR_GET_REASON(l) (int)((l)&0xfffL)
161#define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL) 163#define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL)
162 164
163/* OS fuctions */ 165/* OS functions */
164#define SYS_F_FOPEN 1 166#define SYS_F_FOPEN 1
165#define SYS_F_CONNECT 2 167#define SYS_F_CONNECT 2
166#define SYS_F_GETSERVBYNAME 3 168#define SYS_F_GETSERVBYNAME 3
@@ -239,9 +241,9 @@ void ERR_print_errors(BIO *bp);
239void ERR_add_error_data(int num, ...); 241void ERR_add_error_data(int num, ...);
240#endif 242#endif
241void ERR_load_strings(int lib,ERR_STRING_DATA str[]); 243void ERR_load_strings(int lib,ERR_STRING_DATA str[]);
242void ERR_load_ERR_strings(void ); 244void ERR_load_ERR_strings(void);
243void ERR_load_crypto_strings(void ); 245void ERR_load_crypto_strings(void);
244void ERR_free_strings(void ); 246void ERR_free_strings(void);
245 247
246void ERR_remove_state(unsigned long pid); /* if zero we look it up */ 248void ERR_remove_state(unsigned long pid); /* if zero we look it up */
247ERR_STATE *ERR_get_state(void); 249ERR_STATE *ERR_get_state(void);
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c
index ad820227d2..10c463b389 100644
--- a/src/lib/libcrypto/err/err_all.c
+++ b/src/lib/libcrypto/err/err_all.c
@@ -80,6 +80,7 @@
80#include <openssl/x509v3.h> 80#include <openssl/x509v3.h>
81#include <openssl/conf.h> 81#include <openssl/conf.h>
82#include <openssl/pkcs12.h> 82#include <openssl/pkcs12.h>
83#include <openssl/rand.h>
83#include <openssl/err.h> 84#include <openssl/err.h>
84 85
85void ERR_load_crypto_strings(void) 86void ERR_load_crypto_strings(void)
@@ -116,5 +117,6 @@ void ERR_load_crypto_strings(void)
116 ERR_load_CRYPTO_strings(); 117 ERR_load_CRYPTO_strings();
117 ERR_load_PKCS7_strings(); 118 ERR_load_PKCS7_strings();
118 ERR_load_PKCS12_strings(); 119 ERR_load_PKCS12_strings();
120 ERR_load_RAND_strings();
119#endif 121#endif
120 } 122 }
diff --git a/src/lib/libcrypto/err/openssl.ec b/src/lib/libcrypto/err/openssl.ec
index c2a8acff0c..e132ba3182 100644
--- a/src/lib/libcrypto/err/openssl.ec
+++ b/src/lib/libcrypto/err/openssl.ec
@@ -21,6 +21,7 @@ L PKCS12 crypto/pkcs12/pkcs12.h crypto/pkcs12/pk12err.c
21L RSAREF rsaref/rsaref.h rsaref/rsar_err.c 21L RSAREF rsaref/rsaref.h rsaref/rsar_err.c
22L SSL ssl/ssl.h ssl/ssl_err.c 22L SSL ssl/ssl.h ssl/ssl_err.c
23L COMP crypto/comp/comp.h crypto/comp/comp_err.c 23L COMP crypto/comp/comp.h crypto/comp/comp_err.c
24L RAND crypto/rand/rand.h crypto/rand/rand_err.c
24 25
25 26
26F RSAREF_F_RSA_BN2BIN 27F RSAREF_F_RSA_BN2BIN
@@ -47,11 +48,11 @@ R SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
47R SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 48R SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049
48R SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 49R SSL_R_TLSV1_ALERT_DECODE_ERROR 1050
49R SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 50R SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051
50R SSL_R_TLSV1_ALERT_EXPORT_RESTRICION 1060 51R SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060
51R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 52R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
52R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 53R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
53R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 54R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
54R SSL_R_TLSV1_ALERT_USER_CANCLED 1090 55R SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
55R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 56R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
56 57
57R RSAREF_R_CONTENT_ENCODING 0x0400 58R RSAREF_R_CONTENT_ENCODING 0x0400