modules: mbedtls: Replace select statement with depends on for EC

Instead of using "select" on certain EC configurations, which is
considered unsafe for various reasons, use a "depends on" and rely on
the user to set a proper configuration in the config file.

Update the respective project configurations to comply with the new
configuration scheme.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2022-10-05 15:00:42 +02:00 committed by Carles Cufí
commit b76c35d809
4 changed files with 21 additions and 11 deletions

View file

@ -69,7 +69,7 @@ config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
bool "ECDHE-PSK based ciphersuite modes"
select MBEDTLS_ECDH_C
depends on MBEDTLS_ECDH_C
config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
bool "RSA-PSK based ciphersuite modes"
@ -97,42 +97,40 @@ config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
bool "ECDHE-RSA based ciphersuite modes"
select MBEDTLS_ECDH_C
depends on MBEDTLS_ECDH_C
config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
bool "ECDHE-ECDSA based ciphersuite modes"
select MBEDTLS_ECDH_C
select MBEDTLS_ECDSA_C
depends on MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
bool "ECDH-ECDSA based ciphersuite modes"
select MBEDTLS_ECDH_C
select MBEDTLS_ECDSA_C
depends on MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
config MBEDTLS_ECDSA_DETERMINISTIC
bool "Deterministic ECDSA (RFC 6979)"
config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
bool "ECDH-RSA based ciphersuite modes"
select MBEDTLS_ECDH_C
depends on MBEDTLS_ECDH_C
config MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
bool "ECJPAKE based ciphersuite modes"
select MBEDTLS_ECJPAKE_C
depends on MBEDTLS_ECJPAKE_C
comment "Elliptic curve libraries"
config MBEDTLS_ECDH_C
bool "Elliptic curve Diffie-Hellman library"
select MBEDTLS_ECP_C
depends on MBEDTLS_ECP_C
config MBEDTLS_ECDSA_C
bool "Elliptic curve DSA library"
select MBEDTLS_ECP_C
depends on MBEDTLS_ECP_C
config MBEDTLS_ECJPAKE_C
bool "Elliptic curve J-PAKE library"
select MBEDTLS_ECP_C
depends on MBEDTLS_ECP_C
config MBEDTLS_ECP_C
bool "Elliptic curve over GF(p) library"