Skip to content

Commit

Permalink
modules: mbedtls: Update with PSA dependencies
Browse files Browse the repository at this point in the history
mbedTLS wants matching PSA configuration options for
some of the elliptic curve algorithms nowadays.

These checks are encoded in mbedTLS's check_config.h header.

Signed-off-by: Moritz Fischer <[email protected]>
  • Loading branch information
mfischer committed Feb 29, 2024
1 parent 408babb commit 37808d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/mbedtls/configs/config-tls-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,54 +214,67 @@

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED)
#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
#define PSA_WANT_ECC_SECP_R1_192 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED)
#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
#define PSA_WANT_ECC_SECP_R1_224 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED)
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
#define PSA_WANT_ECC_SECP_R1_256 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED)
#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
#define PSA_WANT_ECC_SECP_R1_384 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED)
#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
#define PSA_WANT_ECC_SECP_R1_521 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED)
#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
#define PSA_WANT_ECC_SECP_K1_192 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED)
#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
#define PSA_WANT_ECC_SECP_K1_224 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED)
#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
#define PSA_WANT_ECC_SECP_K1_256 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED)
#define MBEDTLS_ECP_DP_BP256R1_ENABLED
#define PSA_WANT_ECC_BRAINPOOL_P_R1_256 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED)
#define MBEDTLS_ECP_DP_BP384R1_ENABLED
#define PSA_WANT_ECC_BRAINPOOL_P_R1_384 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED)
#define MBEDTLS_ECP_DP_BP512R1_ENABLED
#define PSA_WANT_ECC_BRAINPOOL_P_R1_512 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED)
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
#define PSA_WANT_ECC_MONTGOMERY_255 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED)
#define MBEDTLS_ECP_DP_CURVE448_ENABLED
#define PSA_WANT_ECC_MONTGOMERY_448 1
#endif

#if defined(CONFIG_MBEDTLS_ECP_NIST_OPTIM)
Expand Down

0 comments on commit 37808d8

Please sign in to comment.