7 Commits (df78c9e3034ac2ab7ac6f8fe13f309a0279d7fa2)

Author SHA1 Message Date
Nick Zana d09fd56842 fido-common: Add Clone, Eq traits to attestation::Statement 1 year ago
Nick Zana 6ef8cee4de fido-common: Add attestation::Statement data type
Attestation statements are returned as part of the CBOR maps returned by
authenticators in response to authenticatorMakeCredential and
authenticatorGetAssertion commands.

The attestation statements defined by WebAuthn come in various formats.
However, the format identifier is not part of the attestation statement
field in the CBOR map (0x03 attStmt), but rather as a distinct format
field (fmt 0x01).

Normally, this could be worked around with an externally tagged enum,
but using integer tags is not currently supported by serde. By marking
the enum instead as untagged, this should ideally mean that serde can
differentiate between the enum variants by the fields of the attestation
statement, which is itself a CBOR map.

Otherwise, we could always revert to just raw byte sequences for the
attestation statements during (de)serialization and push validating
these statements onto another part of the code.
2 years ago
Nick Zana 90f75b88d8 fido-common: Implement Deserialize for attestation::CredentialData
Relies on ciborium as a dependency because coset requires one of
ciborium's error types. It should be possible to remove this type's
dependence on ciborium.
2 years ago
Nick Zana e362a5c237 fido-common: Move attestation::enterprise to its own file 2 years ago
Nick Zana 0fb2487154
Move several types from ctap2-proto to fido-common 2 years ago
Nick Zana d5529827ed
fido-common: Apply minor formatting and docs fixes
Derive standard traits for several types.
Remove unecessary URLs in doc comments.
Apply rustfmt changes.
2 years ago
Nick Zana 1ea1e3b740
Add fido-common crate
fido-common contains data types used by all FIDO specifications.
2 years ago