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/tock/mod.rs vendored
View File

@@ -197,6 +197,7 @@ impl Env for TockEnv {
type Rng = TockRng256;
type UserPresence = Self;
type Storage = TockStorage;
type KeyStore = Self;
type UpgradeStorage = TockUpgradeStorage;
type FirmwareProtection = Self;
type Write = Console;
@@ -215,6 +216,10 @@ impl Env for TockEnv {
&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()
}