Merge pull request #117 from str4d/more-smartcard-errors
Treat `pcsc::Error::NoSmartcard` as a "YubiKey disconnected" error
This commit is contained in:
@@ -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
@@ -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!(
|
||||||
"{}",
|
"{}",
|
||||||
|
|||||||
Reference in New Issue
Block a user