check_config: add missing dependency check for MBEDTLS_PK_WRITE_C

MBEDTLS_PK_WRITE_C requires MBEDTLS_ASN1_WRITE_C, but there is no
corresponding check in check_config.h. In addition, corresponding
documentation for `Requires` is updated in mbedtls_config.h.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
Yanray Wang 2023-12-05 11:00:33 +08:00 committed by Janos Follath
parent 072a068f9f
commit a8f8eb1e35
2 changed files with 4 additions and 2 deletions

View file

@ -440,7 +440,9 @@
#endif #endif
#if defined(MBEDTLS_PK_WRITE_C) && \ #if defined(MBEDTLS_PK_WRITE_C) && \
(!defined(MBEDTLS_PK_C) || !defined(MBEDTLS_OID_C)) (!defined(MBEDTLS_ASN1_WRITE_C) || \
!defined(MBEDTLS_OID_C) || \
!defined(MBEDTLS_PK_C))
#error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites" #error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites"
#endif #endif

View file

@ -3073,7 +3073,7 @@
* Module: library/pkwrite.c * Module: library/pkwrite.c
* Caller: library/x509write.c * Caller: library/x509write.c
* *
* Requires: MBEDTLS_PK_C, MBEDTLS_OID_C * Requires: MBEDTLS_ASN1_WRITE_C, MBEDTLS_OID_C, MBEDTLS_PK_C
* *
* Uncomment to enable generic public key write functions. * Uncomment to enable generic public key write functions.
*/ */