chroe: rename var
This commit is contained in:
10
src/fido.rs
10
src/fido.rs
@@ -64,20 +64,20 @@ pub struct U2fRegistrationData {
|
||||
|
||||
impl U2fRegistrationData {
|
||||
pub fn from(app_id: &str, client_data: &str, register_result: RegisterResult) -> XResult<Self> {
|
||||
let rr = opt_result!(
|
||||
let registration = opt_result!(
|
||||
u2f::register::parse_registration(app_id.to_string(), client_data.as_bytes().to_vec(), register_result.0.to_vec()),
|
||||
"Parse registration data failed: {}");
|
||||
Ok(Self {
|
||||
app_id: app_id.to_string(),
|
||||
device_info: U2FDeviceInfo::from(®ister_result),
|
||||
device_name: rr.device_name,
|
||||
device_name: registration.device_name,
|
||||
client_data: client_data.into(),
|
||||
registration_data: base64::encode(®ister_result.0),
|
||||
attestation_cert_pem: rr.attestation_cert.map(|c| {
|
||||
attestation_cert_pem: registration.attestation_cert.map(|c| {
|
||||
to_pem(&c, "CERTIFICATE", 64)
|
||||
}),
|
||||
pub_key: hex::encode(rr.pub_key),
|
||||
key_handle: hex::encode(rr.key_handle),
|
||||
pub_key: hex::encode(registration.pub_key),
|
||||
key_handle: hex::encode(registration.key_handle),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user