diff --git a/Cargo.lock b/Cargo.lock index 668133b..087242b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2221,7 +2221,7 @@ dependencies = [ [[package]] name = "webauthn-cli" -version = "0.1.2" +version = "0.1.3" dependencies = [ "authenticator", "base64 0.13.0", diff --git a/Cargo.toml b/Cargo.toml index 5ea39e1..55cf76f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "webauthn-cli" -version = "0.1.2" +version = "0.1.3" authors = ["Hatter Jiang "] edition = "2018" diff --git a/src/cmd_challconfig.rs b/src/cmd_challconfig.rs index 74c121c..77ace9a 100644 --- a/src/cmd_challconfig.rs +++ b/src/cmd_challconfig.rs @@ -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);