diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 11:00:56 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 11:00:56 +0000 |
commit | dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c (patch) | |
tree | 2f74e0cfd76a9e092548a9bf52e579aef984299b /crypto/err | |
parent | 58964a492275ca9a59a0cd9c8155cb2491b4b909 (diff) |
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeay
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err.c | 35 | ||||
-rw-r--r-- | crypto/err/err.h | 6 | ||||
-rw-r--r-- | crypto/err/err_genc.pl | 8 | ||||
-rw-r--r-- | crypto/err/ssleay.ec | 13 |
4 files changed, 48 insertions, 14 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index a65192493a..5cf621855a 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -81,6 +81,7 @@ static unsigned long err_hash(); static int err_cmp(); static unsigned long pid_hash(); static int pid_cmp(); +static unsigned long get_error_values(); static void ERR_STATE_free(); ERR_STATE *s; #endif @@ -148,6 +149,14 @@ static ERR_STRING_DATA ERR_str_reasons[]= {ERR_R_PKCS7_LIB ,"PKCS7 lib"}, {ERR_R_MALLOC_FAILURE ,"Malloc failure"}, {ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a fuction you should not call"}, +{ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"}, +{ERR_R_NESTED_ASN1_ERROR ,"nested asn1 error"}, +{ERR_R_BAD_ASN1_OBJECT_HEADER ,"bad asn1 object header"}, +{ERR_R_BAD_GET_ASN1_OBJECT_CALL ,"bad get asn1 object call"}, +{ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"}, +{ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"}, +{ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"}, + {0,NULL}, }; #endif @@ -539,7 +548,9 @@ ERR_STATE *ERR_get_state() CRYPTO_w_lock(CRYPTO_LOCK_ERR); if (thread_hash == NULL) { + MemCheck_off(); thread_hash=lh_new(pid_hash,pid_cmp); + MemCheck_on(); CRYPTO_w_unlock(CRYPTO_LOCK_ERR); if (thread_hash == NULL) return(&fallback); } @@ -618,20 +629,24 @@ VAR_ALIST for (i=0; i<num; i++) { VAR_ARG(args,char *,a); - n+=strlen(a); - if (n > s) + /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */ + if (a != NULL) { - s=n+20; - p=Realloc(str,s+1); - if (p == NULL) + n+=strlen(a); + if (n > s) { - Free(str); - return; + s=n+20; + p=Realloc(str,s+1); + if (p == NULL) + { + Free(str); + return; + } + else + str=p; } - else - str=p; + strcat(str,a); } - strcat(str,a); } ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); diff --git a/crypto/err/err.h b/crypto/err/err.h index 75f931be11..c81dedd666 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -192,6 +192,12 @@ typedef struct err_state_st #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 { diff --git a/crypto/err/err_genc.pl b/crypto/err/err_genc.pl index d3251da842..87c6da9a6d 100644 --- a/crypto/err/err_genc.pl +++ b/crypto/err/err_genc.pl @@ -86,8 +86,8 @@ void ERR_load_${type}_strings() if (${type}_lib_error_code == 0) ${type}_lib_error_code=ERR_get_next_error_library(); - if (init); - {; + if (init) + { init=0; $str } @@ -113,8 +113,8 @@ void ERR_load_${type}_strings() { static int init=1; - if (init); - {; + if (init) + { init=0; $str } diff --git a/crypto/err/ssleay.ec b/crypto/err/ssleay.ec index 10b5dbb59d..12cb3432a8 100644 --- a/crypto/err/ssleay.ec +++ b/crypto/err/ssleay.ec @@ -20,6 +20,7 @@ L SSL ../ssl/ssl.err L SSL2 ../ssl/ssl2.err L SSL3 ../ssl/ssl3.err L SSL23 ../ssl/ssl23.err +L COMP comp/comp.err F RSAREF_F_RSA_BN2BIN F RSAREF_F_RSA_PRIVATE_DECRYPT @@ -30,6 +31,8 @@ F RSAREF_F_RSA_PUBLIC_ENCRYPT R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 R SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 +R SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 +R SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 R SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 R SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 R SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 @@ -39,6 +42,16 @@ R SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 R SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 R SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 R SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 +R SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 +R SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 +R SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 +R SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 +R SSL_R_TLSV1_ALERT_EXPORT_RESTRICION 1060 +R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 +R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 +R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 +R SSL_R_TLSV1_ALERT_USER_CANCLED 1090 +R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 R RSAREF_R_CONTENT_ENCODING 0x0400 R RSAREF_R_DATA 0x0401 |