Browse Source

modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option

Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
pull/75899/head
Tomi Fontanilles 1 year ago committed by Anas Nashif
parent
commit
50c03e9bbe
  1. 12
      modules/mbedtls/Kconfig.tls-generic
  2. 4
      tests/crypto/secp256r1/mbedtls.conf
  3. 5
      tests/crypto/secp256r1/p256-m_raw.conf
  4. 2
      tests/crypto/secp256r1/prj.conf
  5. 2
      tests/crypto/secp256r1/tinycrypt.conf

12
modules/mbedtls/Kconfig.tls-generic

@ -512,17 +512,15 @@ config MBEDTLS_PSA_P256M_DRIVER_ENABLED
imply PSA_WANT_ALG_SHA_256 imply PSA_WANT_ALG_SHA_256
help help
Enable support for the optimized sofware implementation of the secp256r1 Enable support for the optimized sofware implementation of the secp256r1
curve through the standard PSA API interface. curve through the standard PSA API.
config MBEDTLS_PSA_P256M_DRIVER_RAW config MBEDTLS_PSA_P256M_DRIVER_RAW
bool "Access p256-m driver directly (without PSA interface)" bool "Access p256-m driver directly (without PSA interface)"
select MBEDTLS_PSA_P256M_DRIVER_ENABLED depends on MBEDTLS_PSA_P256M_DRIVER_ENABLED
help help
Allow access to p256-m driver directly without using the PSA interface. Allow direct access to the p256-m driver interface.
Warning: usage of this kconfig is prohibited in Zephyr's code base. Users Warning: Usage of this Kconfig option is prohibited in Zephyr's codebase.
can make optionally enable it in case very memory constrained Users can enable it in case of very memory-constrained devices, but be aware that the p256-m interface is absolutely not guaranted to remain stable over time.
devices, but please be aware that the p256-m interface is
absolutely not guaranted to remain stable over time.
config MBEDTLS_SSL_DTLS_CONNECTION_ID config MBEDTLS_SSL_DTLS_CONNECTION_ID
bool "DTLS Connection ID extension" bool "DTLS Connection ID extension"

4
tests/crypto/secp256r1/mbedtls.conf

@ -1,4 +1,5 @@
CONFIG_MBEDTLS=y CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_PSA_P256M_DRIVER_ENABLED=y CONFIG_MBEDTLS_PSA_P256M_DRIVER_ENABLED=y
@ -10,6 +11,3 @@ CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE=y
CONFIG_PSA_WANT_ECC_SECP_R1_256=y CONFIG_PSA_WANT_ECC_SECP_R1_256=y
CONFIG_PSA_WANT_ALG_ECDH=y CONFIG_PSA_WANT_ALG_ECDH=y
CONFIG_PSA_WANT_ALG_ECDSA=y CONFIG_PSA_WANT_ALG_ECDSA=y
CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
CONFIG_ENTROPY_GENERATOR=y

5
tests/crypto/secp256r1/p256-m_raw.conf

@ -1,6 +1,5 @@
CONFIG_MBEDTLS=y CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_PSA_P256M_DRIVER_ENABLED=y
CONFIG_MBEDTLS_PSA_P256M_DRIVER_RAW=y CONFIG_MBEDTLS_PSA_P256M_DRIVER_RAW=y
CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
CONFIG_ENTROPY_GENERATOR=y

2
tests/crypto/secp256r1/prj.conf

@ -1,2 +1,4 @@
CONFIG_ZTEST_STACK_SIZE=8192 CONFIG_ZTEST_STACK_SIZE=8192
CONFIG_ZTEST=y CONFIG_ZTEST=y
CONFIG_ENTROPY_GENERATOR=y

2
tests/crypto/secp256r1/tinycrypt.conf

@ -1,5 +1,3 @@
CONFIG_TINYCRYPT=y CONFIG_TINYCRYPT=y
CONFIG_TINYCRYPT_ECC_DH=y CONFIG_TINYCRYPT_ECC_DH=y
CONFIG_TINYCRYPT_ECC_DSA=y CONFIG_TINYCRYPT_ECC_DSA=y
CONFIG_ENTROPY_GENERATOR=y

Loading…
Cancel
Save