Skip to content

Commit 918f858

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 08ad357 commit 918f858

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
@@ -210,7 +210,7 @@
210210
* - MBEDTLS_BLOCK_CIPHER_xxx_VIA_LEGACY: xxx key type is supported through
211211
* a legacy module (i.e. MBEDTLS_xxx_C)
212212
*/
213-
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
213+
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_CIPHER)
214214
#if defined(PSA_WANT_KEY_TYPE_AES)
215215
#define MBEDTLS_BLOCK_CIPHER_AES_VIA_PSA
216216
#define MBEDTLS_BLOCK_CIPHER_SOME_PSA

0 commit comments

Comments
 (0)