Merge pull request #117 from str4d/more-smartcard-errors

Treat `pcsc::Error::NoSmartcard` as a "YubiKey disconnected" error
This commit is contained in:
str4d
2023-02-11 02:18:34 +00:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -11,6 +11,8 @@ to 0.3.0 are beta releases.
- When `age-plugin-yubikey` assists the user in changing their PIN from the - When `age-plugin-yubikey` assists the user in changing their PIN from the
default PIN, it no longer tells the user that PINs shorter than 6 characters default PIN, it no longer tells the user that PINs shorter than 6 characters
are allowed, and instead loops until the user enters a PIN of valid length. are allowed, and instead loops until the user enters a PIN of valid length.
- More kinds of SmartCard readers are ignored when they have no SmartCard
inserted.
## [0.3.2] - 2023-01-01 ## [0.3.2] - 2023-01-01
### Changed ### Changed
+1 -1
View File
@@ -41,7 +41,7 @@ pub(crate) fn is_connected(reader: Reader) -> bool {
pub(crate) fn filter_connected(reader: &Reader) -> bool { pub(crate) fn filter_connected(reader: &Reader) -> bool {
match reader.open() { match reader.open() {
Err(yubikey::Error::PcscError { Err(yubikey::Error::PcscError {
inner: Some(pcsc::Error::RemovedCard), inner: Some(pcsc::Error::NoSmartcard | pcsc::Error::RemovedCard),
}) => { }) => {
warn!( warn!(
"{}", "{}",