Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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.1...HEAD

-
- Rename `authenticator_config` to `config`.

## [0.6.0-rc.1] 2026-05-21

Expand Down
4 changes: 2 additions & 2 deletions src/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl<'a> Arbitrary<'a> for ctap2::make_credential::ExtensionsInput<'a> {
}

// cannot be derived because of missing impl for Vec<&'a str, N> (rp ID list).
impl<'a> Arbitrary<'a> for ctap2::authenticator_config::SubcommandParameters<'a> {
impl<'a> Arbitrary<'a> for ctap2::config::SubcommandParameters<'a> {
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
let new_min_pin_length = u.arbitrary()?;
let min_pin_length_rp_ids = arbitrary_option(u, arbitrary_vec)?;
Expand All @@ -337,7 +337,7 @@ impl<'a> Arbitrary<'a> for ctap2::authenticator_config::SubcommandParameters<'a>

// cannot be derived because of missing impl for &'a serde_bytes::Bytes (pin_auth)
// + Vec<_> in SubcommandParameters.
impl<'a> Arbitrary<'a> for ctap2::authenticator_config::Request<'a> {
impl<'a> Arbitrary<'a> for ctap2::config::Request<'a> {
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
let sub_command = u.arbitrary()?;
let sub_command_params = u.arbitrary()?;
Expand Down
22 changes: 11 additions & 11 deletions src/ctap2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::{sizes::*, Bytes, TryFromStrError};

pub use crate::operation::{Operation, VendorOperation};

pub mod authenticator_config;
pub mod client_pin;
pub mod config;
pub mod credential_management;
pub mod get_assertion;
pub mod get_info;
Expand Down Expand Up @@ -47,7 +47,7 @@ pub enum Request<'a> {
// 0xC
LargeBlobs(large_blobs::Request<'a>),
// 0xD
AuthenticatorConfig(authenticator_config::Request<'a>),
Config(config::Request<'a>),
// vendor, to be embellished
// Q: how to handle the associated CBOR structures
Vendor(crate::operation::VendorOperation),
Expand Down Expand Up @@ -121,9 +121,9 @@ impl<'a> Request<'a> {
Request::LargeBlobs(cbor_deserialize(data).map_err(CtapMappingError::ParsingError)?)
}

Operation::Config => Request::AuthenticatorConfig(
cbor_deserialize(data).map_err(CtapMappingError::ParsingError)?,
),
Operation::Config => {
Request::Config(cbor_deserialize(data).map_err(CtapMappingError::ParsingError)?)
}

// NB: FIDO Alliance "stole" 0x40 and 0x41, so these are not available
Operation::Vendor(vendor_operation) => Request::Vendor(vendor_operation),
Expand All @@ -150,7 +150,7 @@ pub enum Response {
Selection,
CredentialManagement(credential_management::Response),
LargeBlobs(large_blobs::Response),
AuthenticatorConfig,
Config,
// Q: how to handle the associated CBOR structures
Vendor,
}
Expand All @@ -169,7 +169,7 @@ impl Response {
GetAssertion(response) | GetNextAssertion(response) => cbor_serialize(response, data),
CredentialManagement(response) => cbor_serialize(response, data),
LargeBlobs(response) => cbor_serialize(response, data),
Reset | Selection | AuthenticatorConfig | Vendor => Ok([].as_slice()),
Reset | Selection | Config | Vendor => Ok([].as_slice()),
};
if let Ok(slice) = outcome {
*status = 0;
Expand Down Expand Up @@ -453,7 +453,7 @@ pub trait Authenticator {
Err(Error::InvalidCommand)
}

fn authenticator_config(&mut self, request: &authenticator_config::Request) -> Result<()> {
fn config(&mut self, request: &config::Request) -> Result<()> {
let _ = request;
Err(Error::InvalidCommand)
}
Expand Down Expand Up @@ -547,12 +547,12 @@ pub trait Authenticator {
}

// 0xD
Request::AuthenticatorConfig(request) => {
Request::Config(request) => {
debug_now!("CTAP2.CFG");
self.authenticator_config(request).inspect_err(|_e| {
self.config(request).inspect_err(|_e| {
debug!("error: {:?}", _e);
})?;
Ok(Response::AuthenticatorConfig)
Ok(Response::Config)
}

// Not stable
Expand Down
File renamed without changes.
Loading