Skip to content

Commit 309e5bf

Browse files
frkvtomi-font
authored andcommitted
[nrf noup]: Allow for using legacy when MBEDTLS_FORCE_LEGACY_MD/CIPHER
-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> (edited cherry pick of 98603a8) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent aa20748 commit 309e5bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/mbedtls/config_adjust_legacy_crypto.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
*/
102102

103103
/* PSA accelerated implementations */
104-
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
104+
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_MD)
105105

106106
#if defined(PSA_WANT_ALG_MD5)
107107
#define MBEDTLS_MD_CAN_MD5
@@ -214,7 +214,7 @@
214214
* - MBEDTLS_BLOCK_CIPHER_xxx_VIA_LEGACY: xxx key type is supported through
215215
* a legacy module (i.e. MBEDTLS_xxx_C)
216216
*/
217-
#if defined(MBEDTLS_PSA_CRYPTO_C)
217+
#if defined(MBEDTLS_PSA_CRYPTO_C) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_CIPHER)
218218
#if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
219219
#define MBEDTLS_BLOCK_CIPHER_AES_VIA_PSA
220220
#define MBEDTLS_BLOCK_CIPHER_SOME_PSA

0 commit comments

Comments
 (0)