Properly clear rather than delete keys

This commit is contained in:
Sosthène Guédon
2025-03-06 09:55:34 +01:00
committed by sosthene-nitrokey
parent 8825ed741a
commit 563fcafd00
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -920,7 +920,7 @@ impl<'a, T: Client> LoadedAuthenticator<'a, T> {
};
syscall!(self.trussed.delete(public_key));
if reference.is_encrypted() {
syscall!(self.trussed.delete(secret_key));
syscall!(self.trussed.clear(secret_key));
}
Ok(())
+3 -3
View File
@@ -239,7 +239,7 @@ impl Keys {
};
if let Some(key_id) = user_public_key {
syscall!(client.delete(key_id));
syscall!(client.clear(key_id));
}
old
}
@@ -456,7 +456,7 @@ impl Volatile {
pub fn clear_pin_verified(&mut self, client: &mut impl crate::Client) {
if let Some(key) = self.app_security_status.pin_verified {
syscall!(client.delete(key));
syscall!(client.clear(key));
}
self.app_security_status.pin_verified = None;
self.app_security_status.pin_just_verified = false;
@@ -1195,7 +1195,7 @@ impl ContainerStorage {
Status::UnspecifiedNonpersistentExecutionError
})?;
syscall!(client.delete(key_to_seal));
syscall!(client.clear(key_to_seal));
Ok(())
}
}