You've already forked fido-authenticator
mirror of
https://github.com/trussed-dev/fido-authenticator.git
synced 2026-03-11 16:36:21 -07:00
delete persistent keys on reset if theyre set
This commit is contained in:
committed by
Nicolas Stalder
parent
866e9c22c0
commit
f3e1b5a44b
@@ -234,6 +234,12 @@ impl PersistentState {
|
||||
}
|
||||
|
||||
pub fn reset<S: Syscall>(&mut self, crypto: &mut CryptoClient<S>) -> Result<()> {
|
||||
if let Some(key) = self.key_encryption_key {
|
||||
syscall!(crypto.delete(key));
|
||||
}
|
||||
if let Some(key) = self.key_wrapping_key {
|
||||
syscall!(crypto.delete(key));
|
||||
}
|
||||
self.key_encryption_key = None;
|
||||
self.key_wrapping_key = None;
|
||||
self.consecutive_pin_mismatches = 0;
|
||||
|
||||
Reference in New Issue
Block a user