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]]
|
[[package]]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.5.5"
|
version = "1.5.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"authenticator",
|
"authenticator",
|
||||||
"base64 0.13.1",
|
"base64 0.13.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.5.5"
|
version = "1.5.6"
|
||||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,17 @@ impl Command for CommandImpl {
|
|||||||
|
|
||||||
let mut yk = opt_result!(YubiKey::open(), "YubiKey not found: {}");
|
let mut yk = opt_result!(YubiKey::open(), "YubiKey not found: {}");
|
||||||
|
|
||||||
let retired_slot_id = opt_result!(RetiredSlotId::from_str(slot), "Slot not found: {}");
|
let slot_id = match slot {
|
||||||
debugging!("Slot id: {}", retired_slot_id);
|
"9a" => SlotId::Authentication,
|
||||||
let slot_id = SlotId::Retired(retired_slot_id);
|
"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());
|
json.insert("slot", slot.to_string());
|
||||||
if let Ok(meta) = metadata(&mut yk, slot_id) {
|
if let Ok(meta) = metadata(&mut yk, slot_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user