}
}
- if (asn1_peek_tag(data, ASN1_BOOLEAN)) {
+ if (asn1_peek_tag(data, ASN1_CONTEXT_SIMPLE(1))) {
bool reverse;
- if (!asn1_read_BOOLEAN(data, &reverse)) {
+ if (!asn1_read_BOOLEAN_context(data, &reverse, 1)) {
return false;
}
lssc[num]->reverse = reverse;
return false;
}
+ /*
+ RFC2891 section 1.1:
+ SortKeyList ::= SEQUENCE OF SEQUENCE {
+ attributeType AttributeDescription,
+ orderingRule [0] MatchingRuleId OPTIONAL,
+ reverseOrder [1] BOOLEAN DEFAULT FALSE }
+ */
for (num = 0; lssc[num]; num++) {
if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) {
return false;
}
if (lssc[num]->reverse) {
- if (!asn1_write_BOOLEAN(data, lssc[num]->reverse)) {
+ if (!asn1_write_BOOLEAN_context(data, lssc[num]->reverse, 1)) {
return false;
}
}