auto_credential -> generate_credential
This commit is contained in:
parent
d8aca91136
commit
543198a5fe
@ -315,11 +315,11 @@ pub fn run_cli() -> Fido2LuksResult<()> {
|
||||
match &args.command {
|
||||
Command::AddKey {
|
||||
exclusive,
|
||||
auto_credential,
|
||||
generate_credential,
|
||||
..
|
||||
} => {
|
||||
let (existing_secret, _) = other_secret("Current password", false)?;
|
||||
let (new_secret, cred) = if *auto_credential && luks2 {
|
||||
let (new_secret, cred) = if *generate_credential && luks2 {
|
||||
let cred = make_credential_id(
|
||||
Some(derive_credential_name(luks.device.as_path()).as_str()),
|
||||
(if authenticator.pin && may_require_pin()? {
|
||||
@ -348,7 +348,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
|
||||
&existing_secret[..],
|
||||
luks_mod.kdf_time.or(Some(10)),
|
||||
Some(&cred.id[..])
|
||||
.filter(|_| !luks.disable_token || *auto_credential)
|
||||
.filter(|_| !luks.disable_token || *generate_credential)
|
||||
.filter(|_| luks2),
|
||||
)?;
|
||||
if *exclusive {
|
||||
|
@ -197,8 +197,8 @@ pub enum Command {
|
||||
#[structopt(short = "e", long = "exclusive")]
|
||||
exclusive: bool,
|
||||
/// Will generate an credential while adding a new key to this LUKS device if supported
|
||||
#[structopt(short = "a", long = "auto-cred")]
|
||||
auto_credential: bool,
|
||||
#[structopt(short = "g", long = "gen-cred")]
|
||||
generate_credential: bool,
|
||||
#[structopt(flatten)]
|
||||
existing_secret: OtherSecret,
|
||||
#[structopt(flatten)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user