10 Commits (eb06e4c88d588684b649292f5ddf49f389d2bda0)

Author SHA1 Message Date
Nick Zana 132cd6b03f ctap2-proto: Add ctap2-proto::authenticator::client_pin::raw::RawPermission bitflag set
CTAP 2 uses bitflags to represent the permissions field in client pin
requests. This adds a RawPermission type that can be represented using a
FlagSet<RawPermission> for Serialization and Deserialization.
1 year ago
Nick Zana 4a816e846c ctap2-proto: Add cosey dependency for COSE PublicKey type
Used to manage serialization and deserialization of COSE public keys
instead of coset in order to be able to derive De/Serialize for types
that include COSE public keys as fields in CBOR messages.

coset is inadequate for the purpose because it uses a distinct
AsCborSerialize trait instead of the standard serde::{Serialize,
Deserialize} traits.
1 year ago
Nick Zana 860f574f0a ctap2-proto: Add hex dev-dependency for CBOR debugging 1 year ago
Nick Zana 7f8f97b0c3 ctap2-proto: Derive builder trait for authenticator::credential::make::Request
Adds typed-builder dependency to derive Builder struct.
2 years ago
Nick Zana 166fe1bca6 ctap2-proto: Add serde_with
Required for serializing and deserializing Vec<u8>s as byte strings
instead of sequences of bytes in CTAP request/response types.
2 years ago
Nick Zana cfc7856894 Patch serde to github.com/AndrewScull/serde fork
serde_derive does not currently support using integer values as map
keys. CTAP uses integer values for various CBOR map keys. In order to
properly serialize and deserialize types for the CTAP protocol, a forked
version of serde from a pull request that adds support for renaming
field keys as integer types is used.

Tracked in <https://github.com/serde-rs/serde/pull/2209>
2 years ago
Nick Zana 542a3b9b77 ctap2-proto: Derive serde types for UsizeN
Just a wrapper struct around bounded_integer::BoundedUsize the
bounded_integer/serde1 feature needs to be enabled.
2 years ago
Nick Zana 5803ed02c2 ctap2-proto: Remove bounded_vec dependency
bounded_vec does not correctly handle collections with a lower bound of
0.
2 years ago
Nick Zana 5f87584176
ctap2-proto: Replace unecessary owned types with references in make::Request
Remove IndexMap in favor of borrowed slices for make::Request fields
Update imports
2 years ago
Nick Zana 4082fbb437
Add ctap2-proto crate
The ctap2-proto crate defines the Ctap2_2Authenticator trait, which
implements the latest CTAP spec.
2 years ago