feat: piv

This commit is contained in:
2022-03-27 17:32:23 +08:00
parent b30aab4e03
commit 54b458b694

View File

@@ -43,8 +43,18 @@ impl Command for CommandImpl {
Err(e) => warning!("PIN retries: <none> {}", e),
}
if sub_arg_matches.is_present("show-config") {
let cofnig = yk.config();
information!("Config: {:#?}", cofnig);
let config = yk.config();
information!("Config: {:#?}", config);
}
match yk.piv_keys() {
Ok(keys) => {
information!("Found {} PIV keys", keys.len());
if detail_output {
keys.iter().for_each(|k| information!("Found key: {:?}", k));
}
}
Err(e) => failure!("Get PIV keys failed: {}", e)
}
for slot in yubikey::piv::SLOTS.iter().cloned() {