From f5d8e57eb5041bfb105e41bc9133e250ce538362 Mon Sep 17 00:00:00 2001 From: Emanuele Cesena Date: Tue, 26 May 2026 17:09:19 -0700 Subject: [PATCH 1/2] ctap2.3: getinfo 0x19-0x1F fields + cbor type-mismatch error code --- CHANGELOG.md | 3 ++- src/ctap2.rs | 1 + src/ctap2/get_info.rs | 58 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) 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, } } } From fe6832691e1256846d48645f0bb94d2cb82d3834 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 28 May 2026 22:16:24 +0200 Subject: [PATCH 2/2] Release v0.6.0-rc.3 --- CHANGELOG.md | 10 ++++++++-- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d1e2e..b8c2491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -[Unreleased]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.2...HEAD +[Unreleased]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.3...HEAD + +- + +## [0.6.0-rc.3] 2026-05-28 + +[0.6.0-rc.3]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.2...0.6.0-rc.3 - 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 -[0.6.0-rc.1]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.2...0.6.0-rc.2 +[0.6.0-rc.2]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.1...0.6.0-rc.2 - Rename `authenticator_config` to `config`. - Add `platform-serde` feature for additional `Serialize` and `Deserialize` implementations not required by authenticators. diff --git a/Cargo.toml b/Cargo.toml index 7e7d514..a154c45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ctap-types" -version = "0.6.0-rc.2" +version = "0.6.0-rc.3" authors = ["Nicolas Stalder ", "The Trussed developers"] edition = "2021" license = "Apache-2.0 OR MIT"