Skip to content

Commit

Permalink
Make COSE deserialization more robust
Browse files Browse the repository at this point in the history
Previously, COSE keys could only be deserialized if the map entries were
in the correct order. With this patch, the deserialization is made more
robust (and also more concise) by introducing a helper struct,
RawPublicKey, that is used as an intermediate step during the
deserialization. Also, we make the algorithm field optional to conform
with the spec.

This is a port from ctap-types:
    trussed-dev/ctap-types#8
  • Loading branch information
robin-nitrokey committed Feb 27, 2023
1 parent 5871455 commit 4519e91
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 262 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ serde_repr = "0.1"
version = "1.0"
default-features = false
features = ["derive"]

[dev-dependencies]
cbor-smol = "0.4"
hex = "0.4.3"
quickcheck = "1.0.3"
Loading

0 comments on commit 4519e91

Please sign in to comment.