Skip to content

Commit ffe3291

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 to solve conflicts) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent 0874eae commit ffe3291

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
@@ -159,7 +159,7 @@
159159
#define MBEDTLS_MD_SOME_PSA
160160
#endif
161161

162-
#elif defined(MBEDTLS_PSA_CRYPTO_CLIENT)
162+
#elif defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_MD)
163163

164164
#if defined(PSA_WANT_ALG_MD5)
165165
#define MBEDTLS_MD_CAN_MD5
@@ -273,7 +273,7 @@
273273
* - MBEDTLS_BLOCK_CIPHER_xxx_VIA_LEGACY: xxx key type is supported through
274274
* a legacy module (i.e. MBEDTLS_xxx_C)
275275
*/
276-
#if defined(MBEDTLS_PSA_CRYPTO_C)
276+
#if defined(MBEDTLS_PSA_CRYPTO_C) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_CIPHER)
277277
#if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
278278
#define MBEDTLS_BLOCK_CIPHER_AES_VIA_PSA
279279
#define MBEDTLS_BLOCK_CIPHER_SOME_PSA

0 commit comments

Comments
 (0)