hi

When creating asn1 structure using the configuration file, it actually
necessary to encode conplicated sequences/sets using the configuration
syntax.
asn1_gen  allows on the other hand to 'retag' any object using the IMP
directive. Even universal type can be changed,
but with universal 16/17 the constructed bit is not set.

asn1=FORMAT:HEX,IMP:16U,OCT:020100020101

The included patch fixes that?

TIA for considering this.



--
To verify the signature, see http://edelpki.edelweb.fr/ Cela vous permet de charger le certificat de l'autorité; die Liste mit zurückgerufenen Zertifikaten finden Sie da auch.
*** openssl-SNAP-20080309/crypto/asn1/asn1_gen.c	2007-10-13 18:00:11.000000000 +0200
--- openssl-mod/crypto/asn1/asn1_gen.c	2008-03-09 14:51:56.000000000 +0100
*************** ASN1_TYPE *ASN1_generate_v3(char *str, X
*** 245,252 ****
--- 245,258 ----
  	/* 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);

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to