You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the X.690 specification (ISO/IEC 8825-1:2021 (E)) the ASN.1 standard for Set Of components must be encoded in order when using DER:
11 Restrictions on BER employed by both CER and DER
...
11.6 Set of components
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 has been determined to cause bouncy castle to reject the PKCS#7 signatures that this library produces.
I'll take a look into ordering the Set Of components, presumably this is best done in the toDer method on the asn1 package? Otherwise the sorting could be done when the ASN.1 is constructed.