From 1f877b0fba8881e1a7b8a2f1c7e9a1f9ae78831c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 18 Jul 2024 07:41:51 +0300 Subject: [PATCH] md4: fix compilation with OpenSSL 1.x with md4 disabled If OpenSSL 1.x is used, and it is configured with md4 disabled, OPENSSL_NO_MD4 is defined in opensslconf.h, but this header was not included before checking for this define. Later in md4.c, openssl/md4.h is included, and it includes that header indirectly, leading to inconsistency within md4.c. Since the md4.h branch was taken, wincrypt.h (or others) is not included, and later below the USE_WIN32_CRYPTO branch is taken, but the types are not defined. Closes #14218 --- lib/md4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/md4.c b/lib/md4.c index 489b9e199a..f006bdcf05 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -37,6 +37,9 @@ #if (OPENSSL_VERSION_NUMBER >= 0x30000000L) && !defined(USE_AMISSL) /* OpenSSL 3.0.0 marks the MD4 functions as deprecated */ #define OPENSSL_NO_MD4 +#else +/* Cover also OPENSSL_NO_MD4 configured in openssl */ +#include #endif #endif /* USE_OPENSSL */