Skip to content

Commit

Permalink
adjust_legacy_crypto: move auto-enabling of CRYPTO_CLIENT when CRYPTO_C
Browse files Browse the repository at this point in the history
Move the auto-enabling of CRYPTO_CLIENT when CRYPTO_C at the
beginning of the file so that all that becomes later is aware
of this.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
  • Loading branch information
valeriosetti committed Sep 16, 2024
1 parent 9ea371a commit acd4c96
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/mbedtls/config_adjust_legacy_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
#endif
#endif /* _MINGW32__ || (_MSC_VER && (_MSC_VER <= 1900)) */

/* If MBEDTLS_PSA_CRYPTO_C is defined, make sure MBEDTLS_PSA_CRYPTO_CLIENT
* is defined as well to include all PSA code.
*/
#if defined(MBEDTLS_PSA_CRYPTO_C)
#define MBEDTLS_PSA_CRYPTO_CLIENT
#endif /* MBEDTLS_PSA_CRYPTO_C */

/* Auto-enable CIPHER_C when any of the unauthenticated ciphers is builtin
* in PSA. */
#if defined(MBEDTLS_PSA_CRYPTO_C) && \
Expand Down Expand Up @@ -352,13 +359,6 @@
#define MBEDTLS_PK_CAN_ECDSA_SOME
#endif

/* If MBEDTLS_PSA_CRYPTO_C is defined, make sure MBEDTLS_PSA_CRYPTO_CLIENT
* is defined as well to include all PSA code.
*/
#if defined(MBEDTLS_PSA_CRYPTO_C)
#define MBEDTLS_PSA_CRYPTO_CLIENT
#endif /* MBEDTLS_PSA_CRYPTO_C */

/* Helpers to state that each key is supported either on the builtin or PSA side. */
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || defined(PSA_WANT_ECC_SECP_R1_521)
#define MBEDTLS_ECP_HAVE_SECP521R1
Expand Down

0 comments on commit acd4c96

Please sign in to comment.