feat: v1.5.6, piv-meta supports 9a,9c,9d,9e
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -336,7 +336,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "card-cli"
|
||||
version = "1.5.5"
|
||||
version = "1.5.6"
|
||||
dependencies = [
|
||||
"authenticator",
|
||||
"base64 0.13.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "card-cli"
|
||||
version = "1.5.5"
|
||||
version = "1.5.6"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -34,9 +34,17 @@ impl Command for CommandImpl {
|
||||
|
||||
let mut yk = opt_result!(YubiKey::open(), "YubiKey not found: {}");
|
||||
|
||||
let retired_slot_id = opt_result!(RetiredSlotId::from_str(slot), "Slot not found: {}");
|
||||
debugging!("Slot id: {}", retired_slot_id);
|
||||
let slot_id = SlotId::Retired(retired_slot_id);
|
||||
let slot_id = match slot {
|
||||
"9a" => SlotId::Authentication,
|
||||
"9c" => SlotId::Signature,
|
||||
"9d" => SlotId::KeyManagement,
|
||||
"9e" => SlotId::CardAuthentication,
|
||||
_ => {
|
||||
let retired_slot_id = opt_result!(RetiredSlotId::from_str(slot), "Slot not found: {}");
|
||||
debugging!("Slot id: {}", retired_slot_id);
|
||||
SlotId::Retired(retired_slot_id)
|
||||
}
|
||||
};
|
||||
|
||||
json.insert("slot", slot.to_string());
|
||||
if let Ok(meta) = metadata(&mut yk, slot_id) {
|
||||
|
||||
Reference in New Issue
Block a user