asn1.js
asn1.js copied to clipboard
Entries in a set-of are not being sorted
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.
Oh, that's right. Thank you!