Add Mynewt config for encrypted images
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
index 8051acf..eef9c14 100644
--- a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
+++ b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
@@ -45,6 +45,15 @@
#if MYNEWT_VAL(BOOTUTIL_SIGN_EC)
#define MCUBOOT_SIGN_EC 1
#endif
+#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_RSA)
+#define MCUBOOT_ENCRYPT_RSA 1
+#endif
+#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_KW)
+#define MCUBOOT_ENCRYPT_KW 1
+#endif
+#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_RSA) || MYNEWT_VAL(BOOTUTIL_ENCRYPT_KW)
+#define MCUBOOT_ENC_IMAGES 1
+#endif
#if MYNEWT_VAL(BOOTUTIL_OVERWRITE_ONLY)
#define MCUBOOT_OVERWRITE_ONLY 1
#endif
diff --git a/boot/mynewt/mcuboot_config/syscfg.yml b/boot/mynewt/mcuboot_config/syscfg.yml
index 5eecf98..c34a636 100644
--- a/boot/mynewt/mcuboot_config/syscfg.yml
+++ b/boot/mynewt/mcuboot_config/syscfg.yml
@@ -31,6 +31,12 @@
BOOTUTIL_SIGN_EC256:
description: 'Images are signed using ECDSA NIST P-256.'
value: 0
+ BOOTUTIL_ENCRYPT_RSA:
+ description: 'Support for encrypted images using RSA-2048-OAEP.'
+ value: 0
+ BOOTUTIL_ENCRYPT_KW:
+ description: 'Support for encrypted images using AES-128-Keywrap.'
+ value: 0
BOOTUTIL_USE_MBED_TLS:
description: 'Use mbed TLS for crypto operations.'
value: 1