rust-tuf icon indicating copy to clipboard operation
rust-tuf copied to clipboard

Add handling of additional fields

Open lukesteensen opened this issue 3 years ago • 0 comments

From the TUF spec:

All of the formats described below include the ability to add more attribute-value fields to objects for backwards-compatible format changes. Implementers who encounter undefined attribute-value pairs in the format must include the data when calculating hashes or verifying signatures and must preserve the data when re-serializing.

This adjust the primary metadata structs to include an additional_fields member that collects any unknown top-level keys. Those fields are then available to users of the library as well as present when the struct is re-serialized to JSON.

lukesteensen avatar Oct 05 '22 13:10 lukesteensen