diff --git a/CHANGELOG.md b/CHANGELOG.md index c43e3a5..47d1e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [Unreleased]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.2...HEAD -- +- Add fields 0x19 to 0x1F to `ctap2::get_info::Response`. +- Map `cbor_smol::Error::DeserializeBadBool` to `Error::CborUnexpectedType` instead of `Error::InvalidCbor`. ## [0.6.0-rc.2] 2026-05-27 diff --git a/src/ctap2.rs b/src/ctap2.rs index d75a7b8..5a84dff 100644 --- a/src/ctap2.rs +++ b/src/ctap2.rs @@ -64,6 +64,7 @@ impl From for Error { CtapMappingError::InvalidCommand(_cmd) => Error::InvalidCommand, CtapMappingError::ParsingError(cbor_error) => match cbor_error { cbor_smol::Error::SerdeMissingField => Error::MissingParameter, + cbor_smol::Error::DeserializeBadBool => Error::CborUnexpectedType, _ => Error::InvalidCbor, }, } diff --git a/src/ctap2/get_info.rs b/src/ctap2/get_info.rs index 358749b..9bbc142 100644 --- a/src/ctap2/get_info.rs +++ b/src/ctap2/get_info.rs @@ -1,4 +1,6 @@ use crate::webauthn::FilteredPublicKeyCredentialParameters; +#[cfg(feature = "get-info-full")] +use crate::String; use crate::{Bytes, TryFromStrError, Vec}; use serde::{Deserialize, Serialize}; use serde_indexed::{DeserializeIndexed, SerializeIndexed}; @@ -133,6 +135,48 @@ pub struct Response { #[cfg(feature = "get-info-full")] #[serde(skip_serializing_if = "Option::is_none")] pub long_touch_for_reset: Option, + + // 0x19 + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub enc_identifier: Option>, + + // 0x1A + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub transports_for_reset: Option, 4>>, + + // 0x1B + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub pin_complexity_policy: Option, + + // 0x1C + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub pin_complexity_policy_url: Option>, + + // 0x1D + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub max_pin_length: Option, + + // 0x1E + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub enc_cred_store_state: Option>, + + // 0x1F + // FIDO_2_3 + #[cfg(feature = "get-info-full")] + #[serde(skip_serializing_if = "Option::is_none")] + pub authenticator_config_commands: Option>, } impl Default for Response { @@ -199,6 +243,20 @@ impl ResponseBuilder { uv_count_since_last_pin_entry: None, #[cfg(feature = "get-info-full")] long_touch_for_reset: None, + #[cfg(feature = "get-info-full")] + enc_identifier: None, + #[cfg(feature = "get-info-full")] + transports_for_reset: None, + #[cfg(feature = "get-info-full")] + pin_complexity_policy: None, + #[cfg(feature = "get-info-full")] + pin_complexity_policy_url: None, + #[cfg(feature = "get-info-full")] + max_pin_length: None, + #[cfg(feature = "get-info-full")] + enc_cred_store_state: None, + #[cfg(feature = "get-info-full")] + authenticator_config_commands: None, } } }