From 36a82e5a6b7265d152523a09b0f7e2c8a2c5d40a Mon Sep 17 00:00:00 2001 From: John Durkop Date: Mon, 26 Oct 2020 09:39:05 -0700 Subject: [PATCH] Ensure MBEDTLS_ECDSA_C is set when DETERMINISTIC_ECDSA is used Ensure that MBEDTLS_ECDSA_C is set when PSA_WANT_ALG_DETERMINISTIC_ECDSA is requested. Also added MBEDTLS_ECDSA_C to the requirements comment in config.h for MBEDTLS_ECDSA_DETERMINISTIC. Signed-off-by: John Durkop --- include/mbedtls/config.h | 2 +- include/mbedtls/config_psa.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 6fbaeed0c..48e8855e8 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -864,7 +864,7 @@ * may result in a compromise of the long-term signing key. This is avoided by * the deterministic variant. * - * Requires: MBEDTLS_HMAC_DRBG_C + * Requires: MBEDTLS_HMAC_DRBG_C, MBEDTLS_ECDSA_C * * Comment this macro to disable deterministic ECDSA. */ diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index d9cc4018b..31c5e1d99 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -51,6 +51,7 @@ extern "C" { #if !defined(MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA) #define MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA 1 #define MBEDTLS_ECDSA_DETERMINISTIC +#define MBEDTLS_ECDSA_C #define MBEDTLS_HMAC_DRBG_C #define MBEDTLS_MD_C #endif /* MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA */