Skip to content

Commit 82b1eee

Browse files
michalek-nonordicjm
authored andcommitted
[nrf noup] boot: zephyr: BM key revocation
nrf-squash! [nrf noup] boot: zephyr: Add bm firmware loader code adds KMU key reocation to BM firmware loader. Signed-off-by: Mateusz Michalek <[email protected]>
1 parent 459288d commit 82b1eee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

boot/zephyr/firmware_loader_bm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "bootutil/bootutil_public.h"
1616
#include "bootutil/fault_injection_hardening.h"
1717
#include <bm_installs.h>
18+
#include "bootutil/key_revocation.h"
1819

1920
#include "io/io.h"
2021
#include "mcuboot_config/mcuboot_config.h"
@@ -249,6 +250,15 @@ boot_go(struct boot_rsp *rsp)
249250
}
250251
#endif
251252

253+
#if defined(CONFIG_BOOT_KEYS_REVOCATION)
254+
if (softdevice_image_valid == true && firmware_loader_image_valid == true) {
255+
allow_revoke();
256+
if (revoke() != BOOT_KEY_REVOKE_OK) {
257+
return -1;
258+
}
259+
}
260+
#endif /*CONFIG_BOOT_KEYS_REVOCATION*/
261+
252262
if (app_installer_image_valid == true && app_installer_is_installer_image == true) {
253263
/* Installer image is present, this gets priority */
254264
BOOT_LOG_DBG("Booting installer");

0 commit comments

Comments
 (0)