From: Orgad Shaneh Date: Thu, 18 Jul 2024 04:41:51 +0000 (+0300) Subject: md4: fix compilation with OpenSSL 1.x with md4 disabled X-Git-Tag: curl-8_9_0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f877b0fba8881e1a7b8a2f1c7e9a1f9ae78831c;p=thirdparty%2Fcurl.git 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 --- 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 */