From bc3cfed43ef23b15f29795dcd64f05fcf432666f Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Wed, 27 Apr 2022 14:19:19 +0200 Subject: [PATCH] check_config.h: Add MBEDTLS_MD_C dependency MBEDTLS_PKCS12_C, MBEDTLS_PKCS1_V15, MBEDTLS_PKCS1_V21, MBEDTLS_PK_C Signed-off-by: Przemek Stekiel --- include/mbedtls/check_config.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 1ced6e5780..93d2ae19d8 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -153,6 +153,18 @@ #error "MBEDTLS_PKCS5_C defined, but not all prerequesites" #endif +#if defined(MBEDTLS_PKCS12_C) && !defined(MBEDTLS_MD_C) +#error "MBEDTLS_PKCS12_C defined, but not all prerequesites" +#endif + +#if defined(MBEDTLS_PKCS1_V15) && !defined(MBEDTLS_MD_C) +#error "MBEDTLS_PKCS1_V15 defined, but not all prerequesites" +#endif + +#if defined(MBEDTLS_PKCS1_V21) && !defined(MBEDTLS_MD_C) +#error "MBEDTLS_PKCS1_V21 defined, but not all prerequesites" +#endif + #if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \ !defined(MBEDTLS_SHA256_C)) #error "MBEDTLS_ENTROPY_C defined, but not all prerequisites" @@ -342,7 +354,7 @@ #endif #if defined(MBEDTLS_PK_C) && \ - ( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) ) + ( !defined(MBEDTLS_MD_C) || ( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) ) ) #error "MBEDTLS_PK_C defined, but not all prerequisites" #endif