Add a key store to avoid storing secrets in the store

This commit is contained in:
Julien Cretin
2022-06-29 11:55:02 +02:00
parent 667c269552
commit d793a992d3
9 changed files with 172 additions and 77 deletions

5
src/env/test/mod.rs vendored
View File

@@ -151,6 +151,7 @@ impl Env for TestEnv {
type Rng = TestRng256;
type UserPresence = TestUserPresence;
type Storage = BufferStorage;
type KeyStore = Self;
type UpgradeStorage = BufferUpgradeStorage;
type FirmwareProtection = Self;
type Write = TestWrite;
@@ -169,6 +170,10 @@ impl Env for TestEnv {
&mut self.store
}
fn key_store(&mut self) -> &mut Self {
self
}
fn upgrade_storage(&mut self) -> Option<&mut Self::UpgradeStorage> {
self.upgrade_storage.as_mut()
}