This commit is contained in:
@@ -8,7 +8,7 @@ use cryptsetup_rs::{CryptDevice, Luks1CryptDevice};
|
||||
use libcryptsetup_sys::crypt_keyslot_info;
|
||||
use structopt::StructOpt;
|
||||
|
||||
use std::io::{Write};
|
||||
use std::io::Write;
|
||||
use std::process::exit;
|
||||
|
||||
pub fn add_key_to_luks(
|
||||
|
@@ -43,8 +43,10 @@ impl From<FidoError> for Fido2LuksError {
|
||||
impl From<cryptsetup_rs::device::Error> for Fido2LuksError {
|
||||
fn from(e: cryptsetup_rs::device::Error) -> Self {
|
||||
match e {
|
||||
cryptsetup_rs::device::Error::CryptsetupError(error_no) if error_no.0 == 1i32 => WrongSecret,
|
||||
e => LuksError { cause: e }
|
||||
cryptsetup_rs::device::Error::CryptsetupError(error_no) if error_no.0 == 1i32 => {
|
||||
WrongSecret
|
||||
}
|
||||
e => LuksError { cause: e },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user