Enforce correct PIN lengths during YubiKey setup

The behaviour of `age-plugin-yubikey` during setup now matches its
behaviour during plugin usage.
This commit is contained in:
Jack Grigg
2023-01-29 15:07:25 +00:00
parent fc2081c216
commit b1710e8d69
4 changed files with 72 additions and 45 deletions
-2
View File
@@ -17,7 +17,6 @@ pub enum Error {
CustomManagementKey,
InvalidFlagCommand(String, String),
InvalidFlagTui(String),
InvalidPinLength,
InvalidPinPolicy(String),
InvalidSlot(u8),
InvalidTouchPolicy(String),
@@ -63,7 +62,6 @@ impl fmt::Debug for Error {
command = command.as_str(),
)?,
Error::InvalidFlagTui(flag) => wlnfl!(f, "err-invalid-flag-tui", flag = flag.as_str())?,
Error::InvalidPinLength => wlnfl!(f, "err-invalid-pin-length")?,
Error::InvalidPinPolicy(s) => wlnfl!(
f,
"err-invalid-pin-policy",