File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ function(zephyr_mcuboot_tasks)
153
153
set (imgtool_args --align ${write_block_size} ${imgtool_args} )
154
154
endif ()
155
155
156
+ # Set proper hash calculation algorithm for signing
157
+ if (CONFIG_MCUBOOT_BOOTLOADER_SIGNATURE_TYPE_PURE )
158
+ set (imgtool_args --pure ${imgtool_args} )
159
+ elseif (CONFIG_MCUBOOT_BOOTLOADER_USES_SHA512 )
160
+ set (imgtool_args --sha 512 ${imgtool_args} )
161
+ endif ()
162
+
156
163
# Extensionless prefix of any output file.
157
164
set (output ${ZEPHYR_BINARY_DIR} /${KERNEL_NAME} )
158
165
Original file line number Diff line number Diff line change @@ -289,6 +289,18 @@ config MCUBOOT_BOOTLOADER_NO_DOWNGRADE
289
289
MCUBOOT_DOWNGRADE_PREVENTION option enabled.
290
290
endif
291
291
292
+ config MCUBOOT_BOOTLOADER_USES_SHA512
293
+ bool "MCUboot uses SHA512 for image hash"
294
+ help
295
+ MCUboot has been compiled to verify images using SHA512.
296
+
297
+ config MCUBOOT_BOOTLOADER_SIGNATURE_TYPE_PURE
298
+ bool "Signature is verified over an image rather than sha of an image"
299
+ help
300
+ MCUboot has been compiled to verify images using pure signature
301
+ verification, i.e., the signature is verified over the image rather
302
+ than the SHA of the image.
303
+
292
304
config MCUBOOT_APPLICATION_FIRMWARE_UPDATER
293
305
bool "Application is firmware updater image"
294
306
depends on MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER
You can’t perform that action at this time.
0 commit comments