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]]
name = "fido2luks"
version = "0.2.17"
version = "0.2.18"
dependencies = [
"ctap_hmac",
"failure",

View File

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

View File

@ -93,7 +93,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
} else {
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));
Ok(())
}

View File

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