always set credential name

This commit is contained in:
shimun 2021-07-14 15:44:58 +02:00
parent 51fa26b7d5
commit 5496c4e61b
Signed by: shimun
GPG Key ID: E81D8382DC2F971B
4 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@ -377,7 +377,7 @@ dependencies = [
[[package]] [[package]]
name = "fido2luks" name = "fido2luks"
version = "0.2.17" version = "0.2.18"
dependencies = [ dependencies = [
"ctap_hmac", "ctap_hmac",
"failure", "failure",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fido2luks" name = "fido2luks"
version = "0.2.17" version = "0.2.18"
authors = ["shimunn <shimun@shimun.net>"] authors = ["shimunn <shimun@shimun.net>"]
edition = "2018" edition = "2018"

View File

@ -93,7 +93,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
} else { } else {
None None
}; };
let cred = make_credential_id(name.as_ref().map(|n| n.as_ref()), pin)?; let cred = make_credential_id(Some(name.as_ref()), pin)?;
println!("{}", hex::encode(&cred.id)); println!("{}", hex::encode(&cred.id));
Ok(()) Ok(())
} }

View File

@ -236,9 +236,9 @@ pub enum Command {
Credential { Credential {
#[structopt(flatten)] #[structopt(flatten)]
authenticator: AuthenticatorParameters, authenticator: AuthenticatorParameters,
/// Name to be displayed on the authenticator if it has a display /// Name to be displayed on the authenticator display
#[structopt(env = "FIDO2LUKS_CREDENTIAL_NAME")] #[structopt(env = "FIDO2LUKS_CREDENTIAL_NAME", default_value = "fido2luks")]
name: Option<String>, name: String,
}, },
/// Check if an authenticator is connected /// Check if an authenticator is connected
#[structopt(name = "connected")] #[structopt(name = "connected")]