Ignore smart cards that don't have a PIV applet

Closes str4d/age-plugin-yubikey#78.
This commit is contained in:
Jack Grigg
2023-02-12 00:04:24 +00:00
parent cddb00ab95
commit ac04615219
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -49,6 +49,17 @@ pub(crate) fn filter_connected(reader: &Reader) -> bool {
);
false
}
Err(yubikey::Error::AppletNotFound { applet_name }) => {
warn!(
"{}",
fl!(
"warn-yk-missing-applet",
yubikey_name = reader.name(),
applet_name = applet_name,
),
);
false
}
Err(_) => true,
Ok(yubikey) => {
// We only connected as a side-effect of confirming that we can connect, so