Skip to content

der: SetOf* should allow duplicated elements #2271

@tarcieri

Description

@tarcieri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions