Don't reset tested YubiKeys in key::filter_connected
This method only connects to YubiKeys in order to confirm it can do so (i.e. as a side-effect). We therefore want to explicitly disconnect without resetting the YubiKeys, to avoid clearing PIN caches.
This commit is contained in:
+7
-1
@@ -48,7 +48,13 @@ pub(crate) fn filter_connected(reader: &Reader) -> bool {
|
||||
);
|
||||
false
|
||||
}
|
||||
_ => true,
|
||||
Err(_) => true,
|
||||
Ok(yubikey) => {
|
||||
// We only connected as a side-effect of confirming that we can connect, so
|
||||
// avoid resetting the YubiKey.
|
||||
disconnect_without_reset(yubikey);
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user