mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add test command to overwrite keys
This commit is contained in:
parent
c1ae6b2e5f
commit
f9ef3217f0
2 changed files with 26 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ xous-swapper = { path = "../xous-swapper", optional = true }
|
|||
bytemuck = "1.24.0"
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
keystore = { path = "../keystore" }
|
||||
keystore-api = { path = "../../libs/keystore-api" }
|
||||
|
||||
bio-lib = { path = "../../libs/bio-lib", optional = true }
|
||||
arbitrary-int = "1.2"
|
||||
|
|
@ -89,6 +90,8 @@ test-flash = []
|
|||
ctap-bringup = ["xous-usb-hid"]
|
||||
# this is mutually exclusive with the keystore, as keystore owns rram
|
||||
rramtests = []
|
||||
# for testing key erasure in CI
|
||||
key-testing = ["keystore-api/key-testing", "keystore-api/gen2"]
|
||||
|
||||
# Activating this makes this crate *try* to grab the DUART. To improve its odds
|
||||
# of winning the race, shift its position to first in the list in the PIDs to be
|
||||
|
|
|
|||
|
|
@ -326,6 +326,29 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
}*/
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "key-testing")]
|
||||
"overwrite_keys" => {
|
||||
// used primary to refresh the key store with a new set of random keys between CI tests
|
||||
// that are iterating through various configurations to ensure that the key store is erased.
|
||||
use num_traits::*;
|
||||
let keystore = _env.xns.request_connection_blocking(keystore_api::SERVER_NAME_KEYS).unwrap();
|
||||
xous::send_message(
|
||||
keystore,
|
||||
xous::Message::new_scalar(
|
||||
keystore_api::Opcode::OverwriteKeys.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
log::info!(
|
||||
"{}KEYSTORE.OVERWRITE,{}",
|
||||
bao1x_hal::board::BOOKEND_START,
|
||||
bao1x_hal::board::BOOKEND_END
|
||||
);
|
||||
}
|
||||
/* // leave this around in case we have more swap bugs to debug
|
||||
// needs to have `swaptest1`` & `swaptest2` added to the image for this to work.
|
||||
"swap" => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue