ctap2-proto: Add CTAP Command enum

Adds ctap2_proto::Command enum to represent the CTAP command codes for
the authenticator commands.
main
Nick Zana 2 years ago
parent 5803ed02c2
commit 999c96d3c5

@ -6,7 +6,7 @@ pub mod prelude {
credential::{make, management}, credential::{make, management},
device, reset, selection, device, reset, selection,
}, },
Ctap2_2Authenticator, Command, Ctap2_2Authenticator,
}; };
pub use fido_common::Sha256Hash; pub use fido_common::Sha256Hash;
} }
@ -73,3 +73,20 @@ pub trait Ctap2_2Authenticator {
// fn authenticator_config(request: config::Request) -> Result<(), // fn authenticator_config(request: config::Request) -> Result<(),
// config::Error>; // config::Error>;
} }
#[repr(u8)]
pub enum Command {
AuthenticatorMakeCredential = 0x01,
AuthenticatorGetAssertion = 0x02,
AuthenticatorGetNextAssertion = 0x08,
AuthenticatorGetInfo = 0x04,
AuthenticatorClientPin = 0x06,
AuthenticatorReset = 0x07,
AuthenticatorBioEnrollment = 0x09,
AuthenticatorCredentialManagement = 0x0A,
AuthenticatorSelection = 0x0B,
AuthenticatorLargeBlobs = 0x0C,
AuthenticatorConfig = 0x0D,
PrototypeAuthenticatorBioEnrollment = 0x40,
PrototypeAuthenticatorCredentialmanagement = 0x41,
}

Loading…
Cancel
Save