Add Deserialize trait to PublicKey#12
Merged
robin-nitrokey merged 1 commit intotrussed-dev:mainfrom Feb 25, 2025
Merged
Conversation
252a042 to
3d30a03
Compare
AlfioEmanueleFresta
added a commit
to linux-credentials/libwebauthn
that referenced
this pull request
Feb 24, 2025
## Motivation Makes progress on upstreaming dependency changes, so we can publish our crate. Previous upstreaming request was declined, as COSE types were moved out of `ctap-types`, and into the standalone `cosey` crate (trussed-dev/ctap-types#15). This PR adopts `cosey` for COSE types, and drops our `ctap-types` fork in favour of the published crate. See #54. ## Changes * Remove `ctap-type` fork in favour of: * Fork of `trussed-dev/cosey` for `ctap-type::cose` (this is no longer part of ctap-types). This fork includes the `Deserialize` trait for `PublicKey`, needed in our library. * trussed-dev/cosey#12 * Crate of `trussed-dev/ctap-types` for existing non-COSE uses (eg. `CredentialProtectionPolicy`) * Update `ctap-types` to the latest version * Update `serde-indexed` to 0.1.1 as required by updated `ctap-types` ([Cargo.toml](https://github.com/trussed-dev/ctap-types/blob/496fec4e7370a58d132a66b125483871193e69b5/Cargo.toml#L20)) * Remove `#[serde(default)]` annotation, as this is currently not supported and fails altogether with `serde-indexed 0.1.1`: trussed-dev/serde-indexed#10 ## Follow-up Drop the fork once change is upstreamed: trussed-dev/cosey#12
robin-nitrokey
requested changes
Feb 25, 2025
Member
robin-nitrokey
left a comment
There was a problem hiding this comment.
Thanks for the PR! Looks good to me overall. I just have some minor suggestions, see the comments.
3d30a03 to
ec36b8e
Compare
Contributor
Author
|
Thanks for the review @robin-nitrokey - updated the PR as per your feedback. |
robin-nitrokey
approved these changes
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows @robin-nitrokey's suggestion (#1 (comment)) to implement the Deserialize trait for PublicKey.
Background and motivation:
Upstreaming this change will allow us to publish our first crate for libwebauthn (linux-credentials/libwebauthn#71).
Thanks for your advice so far, and TIA in advance for any feedback!