diff --git a/src/cmd_piv.rs b/src/cmd_piv.rs index b42bb5e..e1e0507 100644 --- a/src/cmd_piv.rs +++ b/src/cmd_piv.rs @@ -43,8 +43,18 @@ impl Command for CommandImpl { Err(e) => warning!("PIN retries: {}", 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() {