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:
Jack Grigg
2023-01-29 14:10:13 +00:00
parent f34c534e84
commit 90b61682bd
+7 -1
View File
@@ -48,7 +48,13 @@ pub(crate) fn filter_connected(reader: &Reader) -> bool {
); );
false 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
}
} }
} }