Skip to content

Commit

Permalink
added: retry pin
Browse files Browse the repository at this point in the history
  • Loading branch information
shimunn committed Jan 24, 2022
1 parent b939e9e commit 4ee5965
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 4ee5965

Please sign in to comment.