Submitted by: Peter Sylvester <Peter.Sylvester@edelweb.fr>

Reviewed by: steve

If tagging is universal and SET or SEQUENCE set constructed bit.
This commit is contained in:
Dr. Stephen Henson 2009-02-10 12:13:08 +00:00
parent 0f529cbdc3
commit ede6ef5e08

View File

@ -245,8 +245,14 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)
/* If IMPLICIT, output tag */
if (asn1_tags.imp_tag != -1)
{
if (asn1_tags.imp_class == V_ASN1_UNIVERSAL
&& (asn1_tags.imp_tag == V_ASN1_SEQUENCE
|| asn1_tags.imp_tag == V_ASN1_SET) )
hdr_constructed = V_ASN1_CONSTRUCTED;
ASN1_put_object(&p, hdr_constructed, hdr_len,
asn1_tags.imp_tag, asn1_tags.imp_class);
}
/* Copy across original encoding */
memcpy(p, cpy_start, cpy_len);