readers: Initial Readers enumerator for detecting YubiKeys

Adds a `yubikey_piv::Readers` type which opens a PC/SC context and can
enumerate detected PC/SC readers with a slightly more ergonomic API than
what's provided in the upstream crate.

Does not support actually instantiating a `YubiKey` from a `Reader<'_>`
yet, but ideally all connections to YubiKeys should go through this API.
This commit is contained in:
Tony Arcieri
2019-12-02 09:32:42 -08:00
parent ae071e706c
commit 589ca3de12
2 changed files with 85 additions and 1 deletions
+2 -1
View File
@@ -156,6 +156,7 @@ mod metadata;
pub mod mgm;
#[cfg(feature = "untested")]
pub mod msroots;
pub mod readers;
#[cfg(feature = "untested")]
mod serialization;
#[cfg(feature = "untested")]
@@ -164,7 +165,7 @@ mod transaction;
pub mod yubikey;
#[cfg(feature = "untested")]
pub use self::{key::Key, mgm::MgmKey};
pub use self::{key::Key, mgm::MgmKey, readers::Readers};
pub use yubikey::YubiKey;
/// Object identifiers