sim: add Mbed TLS EC256 encrypted image support
Add new feature that allows testing EC256 encrypted images using the
Mbed TLS backend.
Move config-ecdsa.h to config-ec.h because definitions are very similar
between ECDSA and ECDH with Mbed TLS so resort to a single config file.
Add new feature and fix the build; add proper Mbed TLS memory
initialization when enc-ec256-mbedtls is used.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/zephyr/include/config-ecdsa.h b/boot/zephyr/include/config-ec.h
similarity index 97%
rename from boot/zephyr/include/config-ecdsa.h
rename to boot/zephyr/include/config-ec.h
index 6ae1ada..99c5aee 100644
--- a/boot/zephyr/include/config-ecdsa.h
+++ b/boot/zephyr/include/config-ec.h
@@ -53,6 +53,7 @@
#endif
#define MBEDTLS_ECDSA_C
+#define MBEDTLS_ECDH_C
/* mbed TLS modules */
#define MBEDTLS_ASN1_PARSE_C
@@ -77,7 +78,7 @@
#define MBEDTLS_MPI_MAX_SIZE 32
-#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024
+#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8