mirror of
https://github.com/trussed-dev/piv-authenticator.git
synced 2026-06-20 04:16:15 -07:00
Use hex! macro
This commit is contained in:
+9
-3
@@ -271,8 +271,14 @@ pub const YUBICO_DEFAULT_MANAGEMENT_KEY: &[u8; 24] = &hex!(
|
||||
"
|
||||
);
|
||||
|
||||
pub const YUBICO_DEFAULT_MANAGEMENT_KEY_ALG: AdministrationAlgorithm = AdministrationAlgorithm::Tdes;
|
||||
pub const YUBICO_DEFAULT_MANAGEMENT_KEY_ALG: AdministrationAlgorithm =
|
||||
AdministrationAlgorithm::Tdes;
|
||||
|
||||
// stolen from le yubico
|
||||
pub const DISCOVERY_OBJECT: &[u8; 20] =
|
||||
b"~\x12O\x0b\xa0\x00\x00\x03\x08\x00\x00\x10\x00\x01\x00_/\x02@\x00";
|
||||
pub const DISCOVERY_OBJECT: [u8; 20] = hex!(
|
||||
"7e 12
|
||||
4f 0b // PIV AID
|
||||
a000000308000010000100
|
||||
5f2f 02 // PIN usage Policy
|
||||
4000"
|
||||
);
|
||||
|
||||
+1
-1
@@ -895,7 +895,7 @@ impl<'a, T: trussed::Client + trussed::client::Ed255> LoadedAuthenticator<'a, T>
|
||||
match container {
|
||||
Container::DiscoveryObject => {
|
||||
// Err(Status::InstructionNotSupportedOrInvalid)
|
||||
reply.extend_from_slice(DISCOVERY_OBJECT).ok();
|
||||
reply.extend_from_slice(&DISCOVERY_OBJECT).ok();
|
||||
// todo!("discovery object"),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user