Use hex! macro

This commit is contained in:
Sosthène Guédon
2022-12-16 11:34:08 +01:00
parent f8030fccad
commit b6c745fc03
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -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
View File
@@ -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"),
}