]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
md4: only build when used
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 11 May 2023 07:06:33 +0000 (09:06 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Sat, 13 May 2023 07:57:35 +0000 (09:57 +0200)
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102

lib/md4.c
tests/unit/unit1611.c

index 318e9da6ae6d1e48793ca79bd9e5934fb34015c0..d575d81d2b8fced2540494edc8881c72748715c6 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -24,7 +24,7 @@
 
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_CRYPTO_AUTH)
+#if defined(USE_CURL_NTLM_CORE)
 
 #include <string.h>
 
@@ -504,4 +504,4 @@ void Curl_md4it(unsigned char *output, const unsigned char *input,
   MD4_Final(output, &ctx);
 }
 
-#endif /* CURL_DISABLE_CRYPTO_AUTH */
+#endif /* USE_CURL_NTLM_CORE */
index 16634234de0a5e47bcc8e0b9b465d2e32a8eb51e..0062ac6c373c7fd501c805f7f0635d081e249fa4 100644 (file)
@@ -37,7 +37,7 @@ static void unit_stop(void)
 
 UNITTEST_START
 
-#ifndef CURL_DISABLE_CRYPTO_AUTH
+#ifdef USE_CURL_NTLM_CORE
   const char string1[] = "1";
   const char string2[] = "hello-you-fool";
   unsigned char output[MD4_DIGEST_LENGTH];