mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
add domain separator for gen2 keys
This commit is contained in:
parent
4526e04abc
commit
f6aa07c20f
1 changed files with 4 additions and 1 deletions
|
|
@ -66,6 +66,9 @@ const SCD_VERSION: u32 = 2;
|
||||||
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
||||||
pub const BASIS_TEST_ROOTNAME: &'static str = "test";
|
pub const BASIS_TEST_ROOTNAME: &'static str = "test";
|
||||||
|
|
||||||
|
#[cfg(feature = "gen2")]
|
||||||
|
const DOMAIN_SEPERATOR: &'static str = "PDDB's key";
|
||||||
|
|
||||||
#[derive(Zeroize)]
|
#[derive(Zeroize)]
|
||||||
#[zeroize(drop)]
|
#[zeroize(drop)]
|
||||||
#[repr(C)] // this can map directly into Flash
|
#[repr(C)] // this can map directly into Flash
|
||||||
|
|
@ -315,7 +318,7 @@ impl PddbOs {
|
||||||
#[cfg(any(feature = "gen2"))]
|
#[cfg(any(feature = "gen2"))]
|
||||||
let ret = PddbOs {
|
let ret = PddbOs {
|
||||||
swapper: xous_swapper::Swapper::new().expect("couldn't connect to swapper"),
|
swapper: xous_swapper::Swapper::new().expect("couldn't connect to swapper"),
|
||||||
rootkeys: keystore::Keystore::new(&xns),
|
rootkeys: keystore::Keystore::new_key(&xns, DOMAIN_SEPERATOR),
|
||||||
flash_page: RefCell::new(xous_swapper::FlashPage::new()),
|
flash_page: RefCell::new(xous_swapper::FlashPage::new()),
|
||||||
tt: ticktimer_server::Ticktimer::new().unwrap(),
|
tt: ticktimer_server::Ticktimer::new().unwrap(),
|
||||||
pddb_mr: pddb,
|
pddb_mr: pddb,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue