Abstract attestation support
This commit is contained in:
8
src/env/test/mod.rs
vendored
8
src/env/test/mod.rs
vendored
@@ -16,8 +16,8 @@ use self::upgrade_storage::BufferUpgradeStorage;
|
||||
use crate::api::connection::{HidConnection, SendOrRecvResult, SendOrRecvStatus};
|
||||
use crate::api::customization::DEFAULT_CUSTOMIZATION;
|
||||
use crate::api::firmware_protection::FirmwareProtection;
|
||||
use crate::api::key_store;
|
||||
use crate::api::user_presence::{UserPresence, UserPresenceResult};
|
||||
use crate::api::{attestation_store, key_store};
|
||||
use crate::clock::ClockInt;
|
||||
use crate::env::Env;
|
||||
use customization::TestCustomization;
|
||||
@@ -149,12 +149,14 @@ impl FirmwareProtection for TestEnv {
|
||||
}
|
||||
|
||||
impl key_store::Helper for TestEnv {}
|
||||
impl attestation_store::Helper for TestEnv {}
|
||||
|
||||
impl Env for TestEnv {
|
||||
type Rng = TestRng256;
|
||||
type UserPresence = TestUserPresence;
|
||||
type Storage = BufferStorage;
|
||||
type KeyStore = Self;
|
||||
type AttestationStore = Self;
|
||||
type UpgradeStorage = BufferUpgradeStorage;
|
||||
type FirmwareProtection = Self;
|
||||
type Write = TestWrite;
|
||||
@@ -177,6 +179,10 @@ impl Env for TestEnv {
|
||||
self
|
||||
}
|
||||
|
||||
fn attestation_store(&mut self) -> &mut Self {
|
||||
self
|
||||
}
|
||||
|
||||
fn upgrade_storage(&mut self) -> Option<&mut Self::UpgradeStorage> {
|
||||
self.upgrade_storage.as_mut()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user