Via #2247 (comment)
X.680, 27.3 NOTE 3 states that:
The set-of type is not a mathematical set of values, thus, as an example, for SET OF INTEGER the values { 1 } and { 1 1 } are distinct.
X.690 elaborates for the purposes of DER:
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.
This does not describe any sort of uniqueness requirement, only an ordering requirement (which due to real world interop reasons we only enforce on encoding, not decoding).
We have an ErrorKind::SetDuplicate variant that should probably be deprecated, and the associated logic for that error case should be removed.
Via #2247 (comment)
X.680, 27.3 NOTE 3 states that:
X.690 elaborates for the purposes of DER:
This does not describe any sort of uniqueness requirement, only an ordering requirement (which due to real world interop reasons we only enforce on encoding, not decoding).
We have an
ErrorKind::SetDuplicatevariant that should probably be deprecated, and the associated logic for that error case should be removed.