chore: u2fsign
This commit is contained in:
@@ -59,7 +59,8 @@ impl Command for CommandImpl {
|
||||
|
||||
information!("Start sign...");
|
||||
information!("App id: {}", app_id);
|
||||
let mut manager = AuthenticatorService::new()?;
|
||||
let mut manager = opt_result!(
|
||||
AuthenticatorService::new(), "Create authenticator service failed: {}");
|
||||
manager.add_u2f_usb_hid_platform_transports();
|
||||
if let Err(e) = manager.sign(
|
||||
flags,
|
||||
@@ -70,13 +71,14 @@ impl Command for CommandImpl {
|
||||
status_tx,
|
||||
callback,
|
||||
) {
|
||||
panic!("Couldn't register: {:?}", e);
|
||||
return simple_error!("Couldn't register: {:?}", e);
|
||||
}
|
||||
|
||||
let sign_result = sign_rx
|
||||
.recv()
|
||||
.expect("Problem receiving, unable to continue");
|
||||
let (_, handle_used, sign_data, device_info) = sign_result.expect("Sign failed");
|
||||
let (_, handle_used, sign_data, device_info) =
|
||||
opt_result!(sign_result, "Sign failed: {}");
|
||||
|
||||
success!("Device info: {}", &device_info);
|
||||
success!("Sign challenge: {}", u2fv2_challenge_str);
|
||||
|
||||
Reference in New Issue
Block a user