feat: v1.7.2

This commit is contained in:
2023-10-01 14:58:05 +08:00
parent 746fdbb53d
commit 0679f73dae
3 changed files with 15 additions and 5 deletions

View File

@@ -52,10 +52,20 @@ impl Command for CommandImpl {
}
match yk.piv_keys() {
Ok(keys) => {
Ok(mut keys) => {
information!("Found {} PIV keys", keys.len());
if detail_output {
keys.iter().for_each(|k| debugging!("Found key: {:?}", k));
keys.sort_by_key(|a| u8::from(a.slot()));
for k in keys {
information!(
"Found PIV #{:x} @{}, subject: {}, signature: {}",
u8::from(k.slot()),
k.slot(),
k.certificate().subject(),
k.certificate().cert.signature_algorithm.oid
);
if detail_output {
debugging!("Found key: {:?}", k);
}
}
}
Err(e) => failure!("Get PIV keys failed: {}", e)