Ignore smart cards that don't have a PIV applet
Closes str4d/age-plugin-yubikey#78.
This commit is contained in:
@@ -120,6 +120,7 @@ cli-setup-finished =
|
|||||||
open-yk-with-serial = ⏳ Please insert the {-yubikey} with serial {$yubikey_serial}.
|
open-yk-with-serial = ⏳ Please insert the {-yubikey} with serial {$yubikey_serial}.
|
||||||
open-yk-without-serial = ⏳ Please insert the {-yubikey}.
|
open-yk-without-serial = ⏳ Please insert the {-yubikey}.
|
||||||
warn-yk-not-connected = Ignoring {$yubikey_name}: not connected
|
warn-yk-not-connected = Ignoring {$yubikey_name}: not connected
|
||||||
|
warn-yk-missing-applet = Ignoring {$yubikey_name}: Missing {$applet_name} applet
|
||||||
|
|
||||||
print-recipient = Recipient: {$recipient}
|
print-recipient = Recipient: {$recipient}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -49,6 +49,17 @@ pub(crate) fn filter_connected(reader: &Reader) -> bool {
|
|||||||
);
|
);
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
Err(yubikey::Error::AppletNotFound { applet_name }) => {
|
||||||
|
warn!(
|
||||||
|
"{}",
|
||||||
|
fl!(
|
||||||
|
"warn-yk-missing-applet",
|
||||||
|
yubikey_name = reader.name(),
|
||||||
|
applet_name = applet_name,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
false
|
||||||
|
}
|
||||||
Err(_) => true,
|
Err(_) => true,
|
||||||
Ok(yubikey) => {
|
Ok(yubikey) => {
|
||||||
// We only connected as a side-effect of confirming that we can connect, so
|
// We only connected as a side-effect of confirming that we can connect, so
|
||||||
|
|||||||
Reference in New Issue
Block a user