diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-02-10 12:13:08 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-02-10 12:13:08 +0000 |
commit | ede6ef5e0813e87b27648c32d1d6de212d967d4e (patch) | |
tree | d613dbf93daea7dc5a6a378f8e9d5122202045b1 /crypto/asn1 | |
parent | 0f529cbdc354570dc872dbc72a37a9f85bebc9e8 (diff) | |
download | openssl-ede6ef5e0813e87b27648c32d1d6de212d967d4e.tar.gz |
Submitted by: Peter Sylvester <Peter.Sylvester@edelweb.fr>
Reviewed by: steve
If tagging is universal and SET or SEQUENCE set constructed bit.
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/asn1_gen.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index 04395d2281..ec18cbff4f 100644 --- a/crypto/asn1/asn1_gen.c +++ b/crypto/asn1/asn1_gen.c @@ -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); |