mynewt: add option for saving enckey TLVs in swap status

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 a67a970..d29ddc3 100644
--- a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
+++ b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
@@ -70,6 +70,9 @@
 #if MYNEWT_VAL(BOOTUTIL_SWAP_USING_MOVE)
 #define MCUBOOT_SWAP_USING_MOVE 1
 #endif
+#if MYNEWT_VAL(BOOTUTIL_SWAP_SAVE_ENCTLV)
+#define MCUBOOT_SWAP_SAVE_ENCTLV 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 ca5a898..d51cd34 100644
--- a/boot/mynewt/mcuboot_config/syscfg.yml
+++ b/boot/mynewt/mcuboot_config/syscfg.yml
@@ -58,6 +58,9 @@
     BOOTUTIL_SWAP_USING_MOVE:
         description: 'Perform swap without requiring scratch.'
         value: 0
+    BOOTUTIL_SWAP_SAVE_ENCTLV:
+        description: 'Save TLVs instead of plaintext encryption keys in swap status.'
+        value: 0
     BOOTUTIL_OVERWRITE_ONLY:
         description: 'Non-swapping upgrades, copy from slot 1 to slot 0 only.'
         value: 0