Module set_of

Module set_of 

Source
Expand description

ASN.1 SET OF support.

§Ordering Notes

Some DER serializer implementations fail to properly sort elements of a SET OF. This is technically non-canonical, but occurs frequently enough that most DER decoders tolerate it. Unfortunately because of that, we must also follow suit.

However, all types in this module sort elements of a set at decode-time, ensuring they’ll be in the proper order if reserialized.

Structs§

SetOf
ASN.1 SET OF backed by an array.
SetOfIter
Iterator over the elements of an SetOf.
SetOfVec
ASN.1 SET OF backed by a Vec.

Functions§

check_der_ordering 🔒
Ensure set elements are lexicographically ordered using DerOrd.
der_sort 🔒
Sort a mut slice according to its DerOrd, returning any errors which might occur during the comparison.
validate 🔒
Validate the elements of a SET OF, ensuring that they are all in order and that there are no duplicates.