Skip to content

Commit c74d5ae

Browse files
pk no longer needs pk_write for ECDSA with MBEDTLS_USE_PSA_CRYPTO
The dependency is still useful for RSA, for which PSA encodes keys with an ASN.1 structure. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent 10a1330 commit c74d5ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/mbedtls/build_info.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@
7474
#include MBEDTLS_USER_CONFIG_FILE
7575
#endif
7676

77-
#if defined(MBEDTLS_PK_C) && defined(MBEDTLS_USE_PSA_CRYPTO)
77+
/* The PK wrappers need pk_write functions to format RSA key objects
78+
* when they are dispatching to the PSA API. */
79+
#if defined(MBEDTLS_PK_C) && defined(MBEDTLS_USE_PSA_CRYPTO) && \
80+
defined(MBEDTLS_RSA_C)
7881
#define MBEDTLS_PK_WRITE_C
7982
#endif
8083

0 commit comments

Comments
 (0)