fix(secure_boot): Fix SB verification failure when sig block and key digest mismatch

- Secure boot V2 verification failed when multiple keys are used to sign the bootloader
  and the application is signed with a key other than the first key that is used to
  sign the bootloader.
- The issue was introduced as a regression from the commit `ff16ce43`.
- Added a QEMU test for recreating the issue.
- Made SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT independent of SECURE_BOOT_BUILD_SIGNED_BINARIES.
This commit is contained in:
harshal.patil
2025-02-27 16:18:47 +05:30
parent afb2154247
commit a6ea9bcd41
12 changed files with 211 additions and 5 deletions

View File

@@ -764,7 +764,7 @@ menu "Security features"
config SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT
bool "Flash bootloader along with other artifacts when using the default flash command"
depends on SECURE_BOOT_V2_ENABLED && SECURE_BOOT_BUILD_SIGNED_BINARIES
depends on SECURE_BOOT_V2_ENABLED
default n
help
When Secure Boot V2 is enabled, by default the bootloader is not flashed along with other artifacts