Skip to content

Commit

Permalink
Keep old credential ID for existing credentials
Browse files Browse the repository at this point in the history
In #59, we changed the format for serialized credentials to use shorter
field names for the RP and user entities.  This has an unintended side
effect:  For non-discoverable credentials that were generated with older
crate versions, the stripped data embedded into the credential ID
includes the RP and user.  If we change their serialization format, we
also change these credential IDs.

We already supported deserializing both formats using a serde alias.
This patch introduces helper enums that deserialize both formats using a
custom Deserialize implementation and keep track of the used format.
This format is then also used for serialization (using serde’s untagged
mechanism that is not available for deserialization in no-std contexts).

#59

Fixes: #111
  • Loading branch information
robin-nitrokey committed Dec 2, 2024
1 parent 86403fa commit 165382d
Show file tree
Hide file tree
Showing 3 changed files with 520 additions and 300 deletions.
Loading

0 comments on commit 165382d

Please sign in to comment.