Add ecdsa to build
This enables building ecdsa feature using tinycrypt (mbed still built
for ASN1). The default mbed-tls config was update to use the MCUBOOT_SIGN_*
symbols.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/zephyr/include/config-boot.h b/boot/zephyr/include/config-boot.h
index 72cca68..fbfe01c 100644
--- a/boot/zephyr/include/config-boot.h
+++ b/boot/zephyr/include/config-boot.h
@@ -34,10 +34,6 @@
#define MBEDTLS_BASE64_C
#endif
-/* TODO: Configure this between app and target. Really, we want the
- * config to come from the app. */
-#define CONFIG_BOOT_VERIFY_RSA_SIGNATURE
-
/* System support */
#define MBEDTLS_PLATFORM_C
#define MBEDTLS_PLATFORM_MEMORY
@@ -61,7 +57,7 @@
#endif
/* mbed TLS feature support */
-#ifdef CONFIG_BOOT_VERIFY_ECDSA_SIGNATURE
+#ifdef MCUBOOT_SIGN_EC
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
#define MBEDTLS_ECP_NIST_OPTIM
@@ -70,7 +66,7 @@
#define MBEDTLS_ECP_C
#endif
-#ifdef CONFIG_BOOT_VERIFY_RSA_SIGNATURE
+#ifdef MCUBOOT_SIGN_RSA
#define MBEDTLS_RSA_C
#define MBEDTLS_PKCS1_V15
#endif
@@ -84,7 +80,7 @@
#define MBEDTLS_SHA256_C
/* Save RAM by adjusting to our exact needs */
-#ifdef CONFIG_BOOT_VERIFY_RSA_SIGNATURE
+#ifdef MCUBOOT_SIGN_RSA
#define MBEDTLS_ECP_MAX_BITS 2048
#define MBEDTLS_MPI_MAX_SIZE 256
#else