From: Dr. Stephen Henson Date: Sat, 30 Apr 2005 18:16:40 +0000 (+0000) Subject: Update from HEAD. X-Git-Tag: BEN_FIPS_TEST_8~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a62b2e54b437c5cb2237ff5d3838a0aadc0e0ff;p=oweals%2Fopenssl.git Update from HEAD. --- diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index d75aa0dc03..0184b475a7 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -1076,6 +1076,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_R_MISSING_SECOND_NUMBER 138 #define ASN1_R_MSTRING_NOT_UNIVERSAL 139 #define ASN1_R_MSTRING_WRONG_TAG 140 +#define ASN1_R_NESTED_ASN1_STRING 174 #define ASN1_R_NON_HEX_CHARACTERS 141 #define ASN1_R_NOT_ENOUGH_DATA 142 #define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c index cb39d35a9a..315d0a0807 100644 --- a/crypto/asn1/asn1_err.c +++ b/crypto/asn1/asn1_err.c @@ -203,6 +203,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]= {ERR_REASON(ASN1_R_MISSING_SECOND_NUMBER),"missing second number"}, {ERR_REASON(ASN1_R_MSTRING_NOT_UNIVERSAL),"mstring not universal"}, {ERR_REASON(ASN1_R_MSTRING_WRONG_TAG) ,"mstring wrong tag"}, +{ERR_REASON(ASN1_R_NESTED_ASN1_STRING) ,"nested asn1 string"}, {ERR_REASON(ASN1_R_NON_HEX_CHARACTERS) ,"non hex characters"}, {ERR_REASON(ASN1_R_NOT_ENOUGH_DATA) ,"not enough data"}, {ERR_REASON(ASN1_R_NO_MATCHING_CHOICE_TYPE),"no matching choice type"}, diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 86c901199b..d9aafacbdf 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -895,7 +895,13 @@ static int asn1_collect(BUF_MEM *buf, unsigned char **in, long len, char inf, in } /* If indefinite length constructed update max length */ if(cst) { - if(!asn1_collect(buf, &p, plen, ininf, tag, aclass)) return 0; +#ifdef OPENSSL_ALLOW_NESTED_ASN1_STRINGS + if (!asn1_collect(buf, &p, plen, ininf, tag, aclass)) + return 0; +#else + ASN1err(ASN1_F_ASN1_COLLECT, ASN1_R_NESTED_ASN1_STRING); + return 0; +#endif } else { if(!collect_data(buf, &p, plen)) return 0; }