Give guidance on reconfiguring YubiKeys with unprotected management keys

Closes str4d/age-plugin-yubikey#21.
This commit is contained in:
Jack Grigg
2022-12-30 10:18:17 +00:00
parent 492612fc8b
commit e4ef700263
2 changed files with 23 additions and 2 deletions
+15 -1
View File
@@ -48,7 +48,21 @@ impl From<yubikey::Error> for Error {
impl fmt::Debug for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::CustomManagementKey => wlnfl!(f, "err-custom-mgmt-key")?,
Error::CustomManagementKey => {
wlnfl!(f, "err-custom-mgmt-key")?;
let cmd = "ykman piv access change-management-key --protect";
let url = "https://developers.yubico.com/yubikey-manager/";
writeln!(
f,
"{}",
fl!(
crate::LANGUAGE_LOADER,
"rec-custom-mgmt-key",
cmd = cmd,
url = url,
),
)?;
}
Error::InvalidFlagCommand(flag, command) => writeln!(
f,
"{}",