feat: update u2f

This commit is contained in:
2022-04-04 16:09:10 +08:00
parent 8d988f5427
commit a67e8dfe4b
2 changed files with 13 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ impl Command for CommandImpl {
fn subcommand<'a>(&self) -> App<'a, 'a> {
SubCommand::with_name(self.name()).about("FIDO U2F Register subcommand")
.arg(Arg::with_name("app-id").short("a").long("app-id").default_value("https://example.com").help("App id"))
.arg(Arg::with_name("timeout").short("t").long("timeout").default_value("10").help("Timeout in seconds"))
.arg(Arg::with_name("timeout").short("t").long("timeout").default_value("30").help("Timeout in seconds"))
.arg(Arg::with_name("json").long("json").help("JSON output"))
}
@@ -72,13 +72,13 @@ impl Command for CommandImpl {
println!("{}", serde_json::to_string_pretty(&u2f_registration_data).unwrap());
} else {
success!("Device info: {}", u2f_registration_data.device_info);
success!("Register challenge: {}", u2fv2_challenge_str);
success!("Register challenge base64: {}", base64::encode(&u2fv2_challenge_str));
information!("Register challenge: {}", u2fv2_challenge_str);
information!("Register challenge base64: {}", base64::encode(&u2fv2_challenge_str));
if let Some(cert) = u2f_registration_data.attestation_cert_pem {
success!("Attestation certificate: {}", cert);
information!("Attestation certificate: {}", cert);
}
if let Some(device_name) = u2f_registration_data.device_name {
success!("Device name: {}", device_name);
information!("Device name: {}", device_name);
}
success!("Public key: {}", u2f_registration_data.pub_key);
success!("Key handle: {}", u2f_registration_data.key_handle);