From 24e88018d226f48f569b03c8be8d324f09e949db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Wed, 19 Jan 2022 12:04:35 +0100 Subject: [PATCH] Add missing config check for PKCS5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PKCS5 depends on MD, but is missing a config check resulting in obscure errors on invalid configurations. Signed-off-by: Sebastian Bøe --- include/mbedtls/check_config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index ce97f6a35..a76e246b4 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -149,6 +149,10 @@ #error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites" #endif +#if defined(MBEDTLS_PKCS5_C) && !defined(MBEDTLS_MD_C) +#error "MBEDTLS_PKCS5_C 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"