chore: pgp
This commit is contained in:
@@ -50,7 +50,7 @@ impl Command for CommandImpl {
|
|||||||
device_config.challenge_response_hmac(&hmac_key, false, false);
|
device_config.challenge_response_hmac(&hmac_key, false, false);
|
||||||
|
|
||||||
if let Err(err) = yubi.write_config(config, &mut device_config) {
|
if let Err(err) = yubi.write_config(config, &mut device_config) {
|
||||||
failure!("{:?}", err);
|
failure!("Config device failed: {:?}", err);
|
||||||
} else {
|
} else {
|
||||||
success!("Device configured");
|
success!("Device configured");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,9 @@ impl Command for CommandImpl {
|
|||||||
|
|
||||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||||
let json_output = sub_arg_matches.is_present("json");
|
let json_output = sub_arg_matches.is_present("json");
|
||||||
if json_output {
|
if json_output { rust_util::util_msg::set_logger_std_out(false); }
|
||||||
rust_util::util_msg::set_logger_std_out(false);
|
|
||||||
}
|
let pin = opt_value_result!(sub_arg_matches.value_of("pin"), "User pin must be assigned");
|
||||||
let pin_opt = sub_arg_matches.value_of("pin");
|
|
||||||
let pin = opt_value_result!(pin_opt, "User pin must be assigned");
|
|
||||||
if pin.len() < 6 { return simple_error!("User pin length:{}, must >= 6!", pin.len()); }
|
if pin.len() < 6 { return simple_error!("User pin length:{}, must >= 6!", pin.len()); }
|
||||||
|
|
||||||
let sha256 = sub_arg_matches.value_of("sha256");
|
let sha256 = sub_arg_matches.value_of("sha256");
|
||||||
|
|||||||
Reference in New Issue
Block a user