From 3cdb64eca65a3eeaab1c6834cb9d86e1ee33d421 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Fri, 22 Aug 2014 12:44:03 -0700 Subject: [PATCH] bypass constructed type identification for sets / sequences --- src/pk/asn1/der/sequence/der_decode_sequence_flexi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c b/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c index ef05847..c074448 100644 --- a/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c +++ b/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c @@ -103,7 +103,7 @@ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc l = l->next; } - if ((is_constructed = ((type & 0x20) ? 1 : 0))) { + if ((is_constructed = (((type & 0x20) && type != 0x30 && type != 0x31) ? 1 : 0))) { /* constructed, use the 'used' field to store the original tag number */ l->used = (type & 0x1F); /* treat constructed elements like SETs */