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

2
Cargo.lock generated
View File

@@ -320,7 +320,7 @@ dependencies = [
[[package]] [[package]]
name = "card-cli" name = "card-cli"
version = "1.7.1" version = "1.7.2"
dependencies = [ dependencies = [
"authenticator", "authenticator",
"base64 0.21.2", "base64 0.21.2",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "card-cli" name = "card-cli"
version = "1.7.1" version = "1.7.2"
authors = ["Hatter Jiang <jht5945@gmail.com>"] authors = ["Hatter Jiang <jht5945@gmail.com>"]
edition = "2018" edition = "2018"

View File

@@ -52,10 +52,20 @@ impl Command for CommandImpl {
} }
match yk.piv_keys() { match yk.piv_keys() {
Ok(keys) => { Ok(mut keys) => {
information!("Found {} PIV keys", keys.len()); information!("Found {} PIV keys", keys.len());
if detail_output { keys.sort_by_key(|a| u8::from(a.slot()));
keys.iter().for_each(|k| debugging!("Found key: {:?}", k)); 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) Err(e) => failure!("Get PIV keys failed: {}", e)