@@ -11,8 +11,8 @@ use crate::{sizes::*, Bytes, TryFromStrError};
1111
1212pub use crate :: operation:: { Operation , VendorOperation } ;
1313
14- pub mod authenticator_config;
1514pub mod client_pin;
15+ pub mod config;
1616pub mod credential_management;
1717pub mod get_assertion;
1818pub mod get_info;
@@ -47,7 +47,7 @@ pub enum Request<'a> {
4747 // 0xC
4848 LargeBlobs ( large_blobs:: Request < ' a > ) ,
4949 // 0xD
50- AuthenticatorConfig ( authenticator_config :: Request < ' a > ) ,
50+ Config ( config :: Request < ' a > ) ,
5151 // vendor, to be embellished
5252 // Q: how to handle the associated CBOR structures
5353 Vendor ( crate :: operation:: VendorOperation ) ,
@@ -121,9 +121,9 @@ impl<'a> Request<'a> {
121121 Request :: LargeBlobs ( cbor_deserialize ( data) . map_err ( CtapMappingError :: ParsingError ) ?)
122122 }
123123
124- Operation :: Config => Request :: AuthenticatorConfig (
125- cbor_deserialize ( data) . map_err ( CtapMappingError :: ParsingError ) ?,
126- ) ,
124+ Operation :: Config => {
125+ Request :: Config ( cbor_deserialize ( data) . map_err ( CtapMappingError :: ParsingError ) ?)
126+ }
127127
128128 // NB: FIDO Alliance "stole" 0x40 and 0x41, so these are not available
129129 Operation :: Vendor ( vendor_operation) => Request :: Vendor ( vendor_operation) ,
@@ -150,7 +150,7 @@ pub enum Response {
150150 Selection ,
151151 CredentialManagement ( credential_management:: Response ) ,
152152 LargeBlobs ( large_blobs:: Response ) ,
153- AuthenticatorConfig ,
153+ Config ,
154154 // Q: how to handle the associated CBOR structures
155155 Vendor ,
156156}
@@ -169,7 +169,7 @@ impl Response {
169169 GetAssertion ( response) | GetNextAssertion ( response) => cbor_serialize ( response, data) ,
170170 CredentialManagement ( response) => cbor_serialize ( response, data) ,
171171 LargeBlobs ( response) => cbor_serialize ( response, data) ,
172- Reset | Selection | AuthenticatorConfig | Vendor => Ok ( [ ] . as_slice ( ) ) ,
172+ Reset | Selection | Config | Vendor => Ok ( [ ] . as_slice ( ) ) ,
173173 } ;
174174 if let Ok ( slice) = outcome {
175175 * status = 0 ;
@@ -453,7 +453,7 @@ pub trait Authenticator {
453453 Err ( Error :: InvalidCommand )
454454 }
455455
456- fn authenticator_config ( & mut self , request : & authenticator_config :: Request ) -> Result < ( ) > {
456+ fn config ( & mut self , request : & config :: Request ) -> Result < ( ) > {
457457 let _ = request;
458458 Err ( Error :: InvalidCommand )
459459 }
@@ -547,12 +547,12 @@ pub trait Authenticator {
547547 }
548548
549549 // 0xD
550- Request :: AuthenticatorConfig ( request) => {
550+ Request :: Config ( request) => {
551551 debug_now ! ( "CTAP2.CFG" ) ;
552- self . authenticator_config ( request) . inspect_err ( |_e| {
552+ self . config ( request) . inspect_err ( |_e| {
553553 debug ! ( "error: {:?}" , _e) ;
554554 } ) ?;
555- Ok ( Response :: AuthenticatorConfig )
555+ Ok ( Response :: Config )
556556 }
557557
558558 // Not stable
0 commit comments