adds user data to persistent storage

This commit is contained in:
Fabian Kaczmarczyck
2020-11-27 15:04:47 +01:00
parent 02c9abc0a3
commit 2a4677c0b1
4 changed files with 169 additions and 42 deletions

View File

@@ -631,6 +631,22 @@ impl PinProtocolV1 {
}
Ok(())
}
#[cfg(test)]
pub fn new_test(
key_agreement_key: crypto::ecdh::SecKey,
pin_uv_auth_token: [u8; 32],
) -> PinProtocolV1 {
PinProtocolV1 {
key_agreement_key,
pin_uv_auth_token,
consecutive_pin_mismatches: 0,
#[cfg(feature = "with_ctap2_1")]
permissions: 0xFF,
#[cfg(feature = "with_ctap2_1")]
permissions_rp_id: None,
}
}
}
#[cfg(test)]