Skip to content

Commit 944e838

Browse files
Summer-ARMFlavio Ceolin
authored and
Flavio Ceolin
committed
Auto-enable MBEDTLS_MD_LIGHT after MBEDTLS_PSA_CRYPTO_CONFIG
PSA_WANT_xxx influences MBEDTLS_xxx, so it can also auto-enable MBEDTLS_MD_LIGHT. applied using: git am modules/tee/tf-m/trusted-firmware-m/lib/ext/mbedcrypto/\ 0008-Auto-enable-MBEDTLS_MD_LIGHT-after-MBEDTLS_PSA_CRYPT.patch Signed-off-by: Summer Qin <[email protected]> Signed-off-by: Joakim Andersson <[email protected]> Signed-off-by: David Brown <[email protected]>
1 parent 4054a5b commit 944e838

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

include/mbedtls/build_info.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,6 @@
8080
#include MBEDTLS_USER_CONFIG_FILE
8181
#endif
8282

83-
/* Auto-enable MBEDTLS_MD_LIGHT based on MBEDTLS_MD_C.
84-
* This allows checking for MD_LIGHT rather than MD_LIGHT || MD_C.
85-
*/
86-
#if defined(MBEDTLS_MD_C)
87-
#define MBEDTLS_MD_LIGHT
88-
#endif
89-
90-
/* Auto-enable MBEDTLS_MD_LIGHT if some module needs it.
91-
*/
92-
#if defined(MBEDTLS_PEM_PARSE_C) || \
93-
defined(MBEDTLS_RSA_C)
94-
#define MBEDTLS_MD_LIGHT
95-
#endif
96-
9783
/* If MBEDTLS_PSA_CRYPTO_C is defined, make sure MBEDTLS_PSA_CRYPTO_CLIENT
9884
* is defined as well to include all PSA code.
9985
*/
@@ -148,6 +134,20 @@
148134
#include "mbedtls/config_psa.h"
149135
#endif
150136

137+
/* Auto-enable MBEDTLS_MD_LIGHT based on MBEDTLS_MD_C.
138+
* This allows checking for MD_LIGHT rather than MD_LIGHT || MD_C.
139+
*/
140+
#if defined(MBEDTLS_MD_C)
141+
#define MBEDTLS_MD_LIGHT
142+
#endif
143+
144+
/* Auto-enable MBEDTLS_MD_LIGHT if some module needs it.
145+
*/
146+
#if defined(MBEDTLS_PEM_PARSE_C) || \
147+
defined(MBEDTLS_RSA_C)
148+
#define MBEDTLS_MD_LIGHT
149+
#endif
150+
151151
#include "mbedtls/check_config.h"
152152

153153
#endif /* MBEDTLS_BUILD_INFO_H */

0 commit comments

Comments
 (0)