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

Add public/private key file option to Kconfig

Also adds instrutions and defaults to prj.conf.

Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent 69c61d0e
Loading
Loading
Loading
Loading
+8
Changes for boot/zephyr/Kconfig: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -38,6 +38,14 @@ config BOOT_SIGNATURE_TYPE_ECDSA_P256

endchoice

config BOOT_SIGNATURE_KEY_FILE
	string "PEM key file"
	default ""
	help
	  The key file will be parsed by imgtool's getpub command and a .c source
	  with the public key information will be written in a format expected by
	  MCUboot.

config MBEDTLS_CFG_FILE
	default "mcuboot-mbedtls-cfg.h"

+10
Changes for boot/zephyr/prj.conf: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,16 @@ CONFIG_SYSTEM_CLOCK_DISABLE=y
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

### Default to RSA
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n

### The bootloader generates its own signature verification based on an
### key file which needs to be provided and match the selected sign algo.
### The PEM files below are provided as examples.
#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"
#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-ec-p256.pem"

### mbedTLS has its own heap
# CONFIG_HEAP_MEM_POOL_SIZE is not set