Skip to content

Commit

Permalink
[nrf noup]: Allow for using legacy when MBEDTLS_FORCE_LEGACY_MD/CIPHER
Browse files Browse the repository at this point in the history
-This allows TF-M minimal configuration to stil dispatch using legacy
 while we are waiting for more apps/samples to be ported to use
 PSA crypto APIs

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
  • Loading branch information
frkv authored and Vge0rge committed Oct 4, 2024
1 parent 904de73 commit 2e24f78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/mbedtls/config_adjust_legacy_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
*/

/* PSA accelerated implementations */
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_MD)
#if defined(PSA_WANT_ALG_MD5)
#define MBEDTLS_MD_CAN_MD5
#define MBEDTLS_MD_MD5_VIA_PSA
Expand Down Expand Up @@ -208,7 +208,7 @@
* - MBEDTLS_BLOCK_CIPHER_xxx_VIA_LEGACY: xxx key type is supported through
* a legacy module (i.e. MBEDTLS_xxx_C)
*/
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_CIPHER)
#if defined(PSA_WANT_KEY_TYPE_AES)
#define MBEDTLS_BLOCK_CIPHER_AES_VIA_PSA
#define MBEDTLS_BLOCK_CIPHER_SOME_PSA
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/md.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/

/* PSA accelerated implementations */
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_MD)
#if defined(PSA_WANT_ALG_MD5)
#define MBEDTLS_MD_CAN_MD5
#define MBEDTLS_MD_MD5_VIA_PSA
Expand Down

0 comments on commit 2e24f78

Please sign in to comment.