feat: add challenge output

This commit is contained in:
2021-07-18 12:28:19 +08:00
parent d44df83c7f
commit 3e5385e268
2 changed files with 4 additions and 0 deletions

View File

@@ -71,6 +71,8 @@ impl Command for CommandImpl {
println!("{}", serde_json::to_string_pretty(&data).unwrap());
} else {
success!("Device info: {}", data.device_info);
success!("Register challenge: {}", u2fv2_challenge_str);
success!("Register challenge base64: {}", base64::encode(&u2fv2_challenge_str));
if let Some(cert) = data.attestation_cert_pem {
success!("Certificate: {}", cert);
}

View File

@@ -77,6 +77,8 @@ impl Command for CommandImpl {
let (_, handle_used, sign_data, device_info) = sign_result.expect("Sign failed");
success!("Device info: {}", &device_info);
success!("Sign challenge: {}", u2fv2_challenge_str);
success!("Sign challenge base64: {}", base64::encode(&u2fv2_challenge_str));
success!("Sign result: {}", base64::encode(&sign_data));
success!("Key handle used: {}", base64::encode(&handle_used));
success!("Key handle used: {}", hex::encode(&handle_used));