feat: v0.1.3

This commit is contained in:
2022-03-28 00:32:13 +08:00
parent cda2b58843
commit 4c98af9c01
3 changed files with 5 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -2221,7 +2221,7 @@ dependencies = [
[[package]]
name = "webauthn-cli"
version = "0.1.2"
version = "0.1.3"
dependencies = [
"authenticator",
"base64 0.13.0",

View File

@@ -1,6 +1,6 @@
[package]
name = "webauthn-cli"
version = "0.1.2"
version = "0.1.3"
authors = ["Hatter Jiang <jht5945@gmail.com>"]
edition = "2018"

View File

@@ -14,6 +14,7 @@ impl Command for CommandImpl {
SubCommand::with_name(self.name()).about("YubiKey challenge-response HMAC config")
.arg(Arg::with_name("secret").short("s").long("secret").takes_value(true).help("Secret"))
.arg(Arg::with_name("secret-hex").short("x").long("secret-hex").takes_value(true).help("Secret HEX"))
.arg(Arg::with_name("button-press").long("button-press").help("Require button press"))
.arg(Arg::with_name("yes-config-chall").long("yes-config-chall").help("Config challenge-response key"))
}
@@ -45,9 +46,10 @@ impl Command for CommandImpl {
.set_command(yubico_manager::config::Command::Configuration2);
let hmac_key: HmacKey = HmacKey::from_slice(&secret_bytes);
let button_press = sub_arg_matches.is_present("button-press");
let mut device_config = DeviceModeConfig::default();
device_config.challenge_response_hmac(&hmac_key, false, false);
device_config.challenge_response_hmac(&hmac_key, false, button_press);
if let Err(err) = yubi.write_config(config, &mut device_config) {
failure!("Config device failed: {:?}", err);