From cf2028aa23d21081903ff66051c843334b1c68d0 Mon Sep 17 00:00:00 2001 From: shimun Date: Mon, 24 Jan 2022 14:42:04 +0100 Subject: [PATCH] added: retry pin --- src/cli.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 1f5a2b5..b583d35 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -502,7 +502,11 @@ pub fn run_cli() -> Fido2LuksResult<()> { match e { Fido2LuksError::WrongSecret if retries > 0 => {} Fido2LuksError::AuthenticatorError { ref cause } - if cause.kind() == FidoErrorKind::Timeout && retries > 0 => {} + if match cause.kind() { + FidoErrorKind::Timeout => true, + FidoErrorKind::CborError(e) if e.code() == 0x33 => true, + _ => false, + } && retries > 0 => {} e => return Err(e), };