test: remove unused fake_memory_set_salt_root
What changed, and why it matters
This commit removes an unused test helper function that set a fake cryptographic salt root during automated testing. It is a routine code cleanup with no effect on the real device firmware or user security.
No security action needed. Treat as normal test-code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes fake_memory_set_salt_root() from the hardware test fake implementation. The function copied 32 bytes into a static _salt_root array used only in unit/integration tests. The companion getter fake_memory_get_salt_root() remains, and the salt root now stays at its compile-time default value in tests. No production code is changed.
Changed components
test/hardware-fakes/include/fake_memory.htest/hardware-fakes/src/fake_memory.cInspect captured patch +0 / −5
diff --git a/test/hardware-fakes/include/fake_memory.h b/test/hardware-fakes/include/fake_memory.h
index e030214..34f38ae 100644
--- a/test/hardware-fakes/include/fake_memory.h
+++ b/test/hardware-fakes/include/fake_memory.h
@@ -27,7 +27,6 @@ bool memory_write_chunk_fake(uint32_t chunk_num, const uint8_t* chunk);
void memory_read_chunk_fake(uint32_t chunk_num, uint8_t* chunk_out);
// Size: `FLASH_SHARED_DATA_LEN`.
void memory_read_shared_bootdata_fake(uint8_t* chunk_out);
-void fake_memory_set_salt_root(const uint8_t* salt_root);
const uint8_t* fake_memory_get_salt_root(void);
void memory_bootloader_hash_fake(uint8_t* hash_out);
void memory_set_bootloader_hash_fake(const uint8_t* fake_hash);
diff --git a/test/hardware-fakes/src/fake_memory.c b/test/hardware-fakes/src/fake_memory.c
index 9b75c18..6c9deea 100644
--- a/test/hardware-fakes/src/fake_memory.c
+++ b/test/hardware-fakes/src/fake_memory.c
@@ -226,10 +226,6 @@ static uint8_t _salt_root[32] = {
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
};
-void fake_memory_set_salt_root(const uint8_t* salt_root)
-{
- memcpy(_salt_root, salt_root, 32);
-}
const uint8_t* fake_memory_get_salt_root(void)
{
return _salt_root;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.