You've already forked ctap-types
mirror of
https://github.com/trussed-dev/ctap-types.git
synced 2026-06-20 04:16:17 -07:00
Rename authenticator_config to config
For consistency with the other commands, this patch renames authenticator_config/AuthenticatorConfig to config/Config. Fixes: https://github.com/trussed-dev/ctap-types/issues/79
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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)?;
|
||||
@@ -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()?;
|
||||
|
||||
+11
-11
@@ -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;
|
||||
@@ -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),
|
||||
@@ -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),
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user