feat: v1.5.8, opt piv-meta
This commit is contained in:
@@ -4,6 +4,10 @@ use rust_util::XResult;
|
||||
use yubikey::piv::RetiredSlotId;
|
||||
use yubikey::piv::SlotId;
|
||||
|
||||
pub fn slot_equals(slot_id: &SlotId, slot: &str) -> bool {
|
||||
get_slot_id(slot).map(|sid| &sid == slot_id).unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn get_slot_id(slot: &str) -> XResult<SlotId> {
|
||||
Ok(match slot {
|
||||
"9a" => SlotId::Authentication,
|
||||
|
||||
Reference in New Issue
Block a user