AAGUID customization (#600)

* Moves the AAGUID to Customization

* Removes the AAGUID from storage

The commit is optional on top of the Customization move. I didn't see
the point in storing the AAGUID in persistent storage anymore, so I
removed it.
This commit is contained in:
kaczmarczyck
2023-03-06 11:42:56 +01:00
committed by GitHub
parent 3135c13e6b
commit 7769e783bb
9 changed files with 67 additions and 85 deletions

12
src/env/tock/mod.rs vendored
View File

@@ -17,7 +17,7 @@ use crate::api::attestation_store::AttestationStore;
use crate::api::connection::{
HidConnection, SendOrRecvError, SendOrRecvResult, SendOrRecvStatus, UsbEndpoint,
};
use crate::api::customization::{CustomizationImpl, DEFAULT_CUSTOMIZATION};
use crate::api::customization::{CustomizationImpl, AAGUID_LENGTH, DEFAULT_CUSTOMIZATION};
use crate::api::firmware_protection::FirmwareProtection;
use crate::api::user_presence::{UserPresence, UserPresenceError, UserPresenceResult};
use crate::api::{attestation_store, key_store};
@@ -38,6 +38,14 @@ use rng256::Rng256;
mod clock;
mod storage;
pub const AAGUID: &[u8; AAGUID_LENGTH] =
include_bytes!(concat!(env!("OUT_DIR"), "/opensk_aaguid.bin"));
const TOCK_CUSTOMIZATION: CustomizationImpl = CustomizationImpl {
aaguid: AAGUID,
..DEFAULT_CUSTOMIZATION
};
/// RNG backed by the TockOS rng driver.
pub struct TockRng256 {}
@@ -279,7 +287,7 @@ impl Env for TockEnv {
}
fn customization(&self) -> &Self::Customization {
&DEFAULT_CUSTOMIZATION
&TOCK_CUSTOMIZATION
}
fn main_hid_connection(&mut self) -> &mut Self::HidConnection {