Compare commits

...

2 Commits

Author SHA1 Message Date
4ee5965bfa added: retry pin 2022-01-24 14:36:07 +01:00
b939e9efcd added: allow-discards env var 2022-01-24 14:19:04 +01:00
2 changed files with 6 additions and 2 deletions

View File

@@ -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),
};

View File

@@ -245,7 +245,7 @@ pub enum Command {
#[structopt(long = "dry-run")]
dry_run: bool,
/// Pass SSD trim instructions to the underlying block device
#[structopt(long = "allow-discards")]
#[structopt(long = "allow-discards", env = "FIDO2LUKS_ALLOW_DISCARDS")]
allow_discards: bool,
},
/// Generate a new FIDO credential