feat: v0.1.3
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user