From a8f8eb1e356564bd5aeb3b0c34795188105798f1 Mon Sep 17 00:00:00 2001 From: Yanray Wang Date: Tue, 5 Dec 2023 11:00:33 +0800 Subject: [PATCH] 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 --- include/mbedtls/check_config.h | 4 +++- include/mbedtls/mbedtls_config.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 1ccd24edf..576efeae0 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -440,7 +440,9 @@ #endif #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" #endif diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index 2cfb4fcab..254e75a1a 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -3073,7 +3073,7 @@ * Module: library/pkwrite.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. */