Skip to content

Commit

Permalink
cmake: sysbuild: image_signing: Fix custom signing
Browse files Browse the repository at this point in the history
Fixes an issue with custom signing method. Default public
key was used instead of key given with KConfig.

Signed-off-by: Grzegorz Chwierut <[email protected]>
  • Loading branch information
gchwier committed May 20, 2024
1 parent 9ec27c6 commit 53da5b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/sysbuild/sign.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ function(b0_sign_image slot)
)
elseif(SB_CONFIG_SECURE_BOOT_SIGNING_CUSTOM)
set(custom_sign_cmd "${SB_CONFIG_SECURE_BOOT_SIGNING_COMMAND}")
set(SIGNATURE_PUBLIC_KEY_FILE ${SB_CONFIG_SECURE_BOOT_SIGNING_PUBLIC_KEY})
set(SIGNATURE_PUBLIC_KEY_FILE ${SB_CONFIG_SECURE_BOOT_SIGNING_PUBLIC_KEY} PARENT_SCOPE)

if (("${custom_sign_cmd}" STREQUAL "") OR (NOT EXISTS ${SIGNATURE_PUBLIC_KEY_FILE}))
message(FATAL_ERROR "You must specify a signing command and valid public key file for custom signing.")
Expand Down

0 comments on commit 53da5b3

Please sign in to comment.