Enable library users to detect if a smart card doesn't support PIV (#476)
* Enable library users to detect if a smart card doesn't support PIV Closes iqlusioninc/yubikey.rs#456. * Avoid resetting the card if we fail to select PIV or fetch version/serial
This commit is contained in:
+10
@@ -48,6 +48,16 @@ use des::{
|
||||
#[cfg(feature = "untested")]
|
||||
use {hmac::Hmac, pbkdf2::pbkdf2, sha1::Sha1};
|
||||
|
||||
/// YubiKey MGMT Applet Name
|
||||
#[cfg(feature = "untested")]
|
||||
pub(crate) const APPLET_NAME: &str = "YubiKey MGMT";
|
||||
|
||||
/// MGMT Applet ID.
|
||||
///
|
||||
/// <https://developers.yubico.com/PIV/Introduction/Admin_access.html>
|
||||
#[cfg(feature = "untested")]
|
||||
pub(crate) const APPLET_ID: &[u8] = &[0xa0, 0x00, 0x00, 0x05, 0x27, 0x47, 0x11, 0x17];
|
||||
|
||||
pub(crate) const ADMIN_FLAGS_1_PROTECTED_MGM: u8 = 0x02;
|
||||
|
||||
#[cfg(feature = "untested")]
|
||||
|
||||
Reference in New Issue
Block a user