asn1.js icon indicating copy to clipboard operation
asn1.js copied to clipboard

Entries in a set-of are not being sorted

Open justmoon opened this issue 7 years ago • 1 comments

X.690 (08/2015), section 11 (Restrictions on BER employed by both CER and DER), subsection 11.6 (Set-of components) reads:

The encodings of the component values of a set-of value shall appear in ascending order, the encodings being compared as octet strings with the shorter components being padded at their trailing end with 0-octets.

NOTE – The padding octets are for comparison purposes only and do not appear in the encodings.

This library does not currently sort set-of components in canonical order when encoding DER.

justmoon avatar Dec 24 '16 22:12 justmoon

Oh, that's right. Thank you!

indutny avatar Dec 27 '16 22:12 indutny