summaryrefslogtreecommitdiff
path: root/src/ltc/pk/asn1
diff options
context:
space:
mode:
authorKarel Miko <miko@dcit.cz>2014-01-14 11:25:42 +0100
committerKarel Miko <miko@dcit.cz>2014-01-14 11:25:42 +0100
commit39befca27e4dd2435f8e3a4961dc55a2596bc942 (patch)
tree67cf54a9f57746ee6c3f9622075e902c2fa26658 /src/ltc/pk/asn1
parent91de7b674369a52a1a221be7baadb42afcbf755c (diff)
support for optional items in ASN.1 sequences (2)
Diffstat (limited to 'src/ltc/pk/asn1')
-rw-r--r--src/ltc/pk/asn1/der/sequence/der_length_sequence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltc/pk/asn1/der/sequence/der_length_sequence.c b/src/ltc/pk/asn1/der/sequence/der_length_sequence.c
index 65030cd9..f1d6b803 100644
--- a/src/ltc/pk/asn1/der/sequence/der_length_sequence.c
+++ b/src/ltc/pk/asn1/der/sequence/der_length_sequence.c
@@ -45,7 +45,7 @@ int der_length_sequence(ltc_asn1_list *list, unsigned long inlen,
break;
}
- if (!list[i].used) continue; /* some items may be optional */
+ if (!list[i].used && list[i].optional) continue; /* some items may be optional */
switch (type) {
case LTC_ASN1_BOOLEAN: