Commit ca8ead2a authored by Fabio Utzig's avatar Fabio Utzig Committed by Fabio Utzig
Browse files

zephyr: add option for saving enckey TLVs in swap status

Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent 6e137818
Loading
Loading
Loading
Loading
+13 −0
Changes for boot/zephyr/Kconfig: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -147,6 +147,19 @@ config BOOT_BOOTSTRAP
	  primary slot to be initialized from a valid image in the secondary slot.
	  If unsure, leave at the default value.

config BOOT_SWAP_SAVE_ENCTLV
	bool "Save encrypted key TLVs instead of plaintext keys in swap metadata"
	default n
	help
	  If y, instead of saving the encrypted image keys in plaintext in the
	  swap resume metadata, save the encrypted image TLVs. This should be used
	  when there is no security mechanism protecting the data in the primary
	  slot from being dumped. If n is selected (default), the keys are written
	  after being decrypted from the image TLVs and could be read by an
	  attacker who has access to the flash contents of the primary slot (eg
	  JTAG/SWD or primary slot in external flash).
	  If unsure, leave at the default value.

config BOOT_ENCRYPT_RSA
	bool "Support for encrypted upgrade images using RSA"
	default n
+4 −0
Changes for boot/zephyr/include/mcuboot_config/mcuboot_config.h: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -61,6 +61,10 @@
#define MCUBOOT_HAVE_LOGGING 1
#endif

#ifdef CONFIG_BOOT_SWAP_SAVE_ENCTLV
#define MCUBOOT_SWAP_SAVE_ENCTLV 1
#endif

#ifdef CONFIG_BOOT_ENCRYPT_RSA
#define MCUBOOT_ENC_IMAGES
#define MCUBOOT_ENCRYPT_RSA
+1 −0
Changes for boot/zephyr/prj.conf: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ CONFIG_SYS_POWER_MANAGEMENT=n
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_RSA=n
CONFIG_BOOT_ENCRYPT_EC256=n