Skip to content

Conversation

@AlfioEmanueleFresta
Copy link
Contributor

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!

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
Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Looks good to me overall. I just have some minor suggestions, see the comments.

@AlfioEmanueleFresta
Copy link
Contributor Author

Thanks for the review @robin-nitrokey - updated the PR as per your feedback.

@robin-nitrokey robin-nitrokey merged commit 2388e31 into trussed-dev:main Feb 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants