9 Commits

Author SHA1 Message Date
Robin Krahl 53359f7138 Remove cbor-smol re-export
Renaming cbor-smol to serde is confusing and the re-export is not
necessary as the cbor-smol version is an implementation detail.

Fixes: https://github.com/trussed-dev/ctap-types/issues/69
2026-06-08 10:07:44 +02:00
Robin Krahl a2cc1089f3 Use cosey 2024-06-02 12:25:42 +02:00
Robin Krahl 2a563c82f1 cose: Allow missing algorithms
The algorithm field is optional, see RFC 8152 § 7:

   COSE_Key = {
       1 => tstr / int,          ; kty
       ? 2 => bstr,              ; kid
       ? 3 => tstr / int,        ; alg
       ? 4 => [+ (tstr / int) ], ; key_ops
       ? 5 => bstr,              ; Base IV
       * label => values
   }

   alg:  This parameter is used to restrict the algorithm that is used
      with the key.  If this parameter is present in the key structure,
      the application MUST verify that this algorithm matches the
      algorithm for which the key is being used.
2023-11-21 11:56:52 +01:00
Robin Krahl 6ff764d02e Refactor COSE serialization and deserialization
This patch introduces the RawPublicKey helper type that takes care of
serialization and deserialization of the key type.  The *PublicKey
structs now only need to check if all required fields are present and
have the correct value.  It also adds extensive tests to make sure that
serialization and deserialization work correctly.
2023-11-21 11:56:52 +01:00
Felix Gohla 2b5a295793 Add largeBlobKey Extension to authenticatorGetAssertion 2023-11-15 18:56:45 +01:00
Sosthène Guédon d9c90b8d10 Fix tests 2023-11-15 14:56:45 +01:00
Nicolas Stalder 5d6a56e586 Apply a round of cargo clippy + fmt 2022-03-05 20:14:14 +01:00
Robin Krahl 2262ee72f1 Add tests for parsing get_assertion::Parameters
The deserialization of authenticatorGetAssertion requests using the
hmac-secret extension as sent by e. g. python-fido2 currently fails.
This patch adds some tests with the offending input.
2021-11-24 23:48:14 +01:00
Nicolas Stalder 04f99681ba Nice! webauthn.io lets us in 2020-03-28 22:59:04 +01:00