pub struct CardReport {
pub serial: u32,
pub firmware: String,
pub pin: Option<CredentialMetadata>,
pub puk: Option<CredentialMetadata>,
pub management_key: Option<MgmtMetadata>,
pub protection: ProtectionMode,
pub slot: SlotReport,
pub key_check: Option<SlotKeyCheck>,
}Expand description
The state of a YubiKey, from read-only APDUs.
Fields§
§serial: u32§firmware: String§pin: Option<CredentialMetadata>None on firmware without GET METADATA (< 5.3).
puk: Option<CredentialMetadata>§management_key: Option<MgmtMetadata>§protection: ProtectionMode§slot: SlotReport§key_check: Option<SlotKeyCheck>The key/certificate match check, when the caller ran it.
Implementations§
Source§impl CardReport
impl CardReport
Sourcepub fn build(ctx: &Context, slot: u8) -> Self
pub fn build(ctx: &Context, slot: u8) -> Self
Build the report for the YubiKey of ctx, with slot as the store
slot. Read-only; no PIN.
Sourcepub fn has_metadata(&self) -> bool
pub fn has_metadata(&self) -> bool
The firmware reports PIN, PUK and management key metadata (5.3+).
pub fn pin_blocked(&self) -> bool
pub fn puk_blocked(&self) -> bool
Trait Implementations§
Source§impl Clone for CardReport
impl Clone for CardReport
Source§impl Debug for CardReport
impl Debug for CardReport
impl Eq for CardReport
Source§impl PartialEq for CardReport
impl PartialEq for CardReport
impl StructuralPartialEq for CardReport
Auto Trait Implementations§
impl Freeze for CardReport
impl RefUnwindSafe for CardReport
impl Send for CardReport
impl Sync for CardReport
impl Unpin for CardReport
impl UnsafeUnpin for CardReport
impl UnwindSafe for CardReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.