Skip to content

Commit 2e24f78

Browse files
frkvVge0rge
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>
1 parent 904de73 commit 2e24f78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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
#if defined(PSA_WANT_ALG_MD5)
106106
#define MBEDTLS_MD_CAN_MD5
107107
#define MBEDTLS_MD_MD5_VIA_PSA
@@ -208,7 +208,7 @@
208208
* - MBEDTLS_BLOCK_CIPHER_xxx_VIA_LEGACY: xxx key type is supported through
209209
* a legacy module (i.e. MBEDTLS_xxx_C)
210210
*/
211-
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
211+
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_CIPHER)
212212
#if defined(PSA_WANT_KEY_TYPE_AES)
213213
#define MBEDTLS_BLOCK_CIPHER_AES_VIA_PSA
214214
#define MBEDTLS_BLOCK_CIPHER_SOME_PSA

include/mbedtls/md.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838

3939
/* PSA accelerated implementations */
40-
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
40+
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(CONFIG_MBEDTLS_FORCE_LEGACY_MD)
4141
#if defined(PSA_WANT_ALG_MD5)
4242
#define MBEDTLS_MD_CAN_MD5
4343
#define MBEDTLS_MD_MD5_VIA_PSA

0 commit comments

Comments
 (0)