Skip to content

Commit bfc348a

Browse files
committed
build_info: complete list of symbols that auto-enable ECP_LIGHT
The comment is also updated accordingly. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
1 parent 8ff3a72 commit bfc348a

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

include/mbedtls/build_info.h

+17-5
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,23 @@
117117
#define MBEDTLS_MD_LIGHT
118118
#endif
119119

120-
/* MBEDTLS_ECP_C now consists of MBEDTLS_ECP_LIGHT plus functions for curve
121-
* arithmetic. As a consequence if MBEDTLS_ECP_C is required for some reason,
122-
* then MBEDTLS_ECP_LIGHT should be enabled as well. */
123-
#if defined(MBEDTLS_ECP_C) || defined(MBEDTLS_PK_PARSE_EC_EXTENDED) || \
124-
defined(MBEDTLS_PK_PARSE_EC_COMPRESSED)
120+
/* MBEDTLS_ECP_LIGHT is auto-enabled by the following symbols:
121+
* - MBEDTLS_ECP_C because now it consists of MBEDTLS_ECP_LIGHT plus functions
122+
* for curve arithmetic. As a consequence if MBEDTLS_ECP_C is required for
123+
* some reason, then MBEDTLS_ECP_LIGHT should be enabled as well.
124+
* - MBEDTLS_PK_PARSE_EC_EXTENDED and MBEDTLS_PK_PARSE_EC_COMPRESSED because
125+
* these features are not supported in PSA so the only way to have them is
126+
* to enable the built-in solution.
127+
* - PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE because Weierstrass key derivation
128+
* still depends on ECP_LIGHT
129+
* - PK_C + USE_PSA + PSA_WANT_ALG_ECDSA is a temporary dependency which will
130+
* be fixed by #7453
131+
*/
132+
#if defined(MBEDTLS_ECP_C) || \
133+
defined(MBEDTLS_PK_PARSE_EC_EXTENDED) || \
134+
defined(MBEDTLS_PK_PARSE_EC_COMPRESSED) || \
135+
defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE) || \
136+
(defined(MBEDTLS_PK_C) && defined(MBEDTLS_USE_PSA_CRYPTO) && defined(PSA_WANT_ALG_ECDSA))
125137
#define MBEDTLS_ECP_LIGHT
126138
#endif
127139

0 commit comments

Comments
 (0)