]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mbedtls: switch off NTLM in build if md4 isn't available
authorTony Kelman <tony@kelman.net>
Mon, 12 Sep 2016 04:16:30 +0000 (21:16 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Sep 2016 21:08:10 +0000 (23:08 +0200)
NTLM support with mbedTLS was added in 497e7c9 but requires that mbedTLS
is built with the MD4 functions available, which it isn't in default
builds. This now adapts if the funtion isn't there and builds libcurl
without NTLM support if so.

Fixes #1004

lib/curl_setup.h

index 9f29b2e9ad4a5f2016f0a2254c72b8d086bc72eb..5d82e339b5bdf007bf1eedb4d9cf871f74a0ad04 100644 (file)
@@ -634,11 +634,17 @@ int netware_init(void);
 /* Single point where USE_NTLM definition might be defined */
 #if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH)
 #if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \
-    defined(USE_GNUTLS) || defined(USE_MBEDTLS) || defined(USE_NSS) || \
-    defined(USE_DARWINSSL) || defined(USE_OS400CRYPTO) || \
-    defined(USE_WIN32_CRYPTO)
+    defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \
+    defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
 
 #define USE_NTLM
+
+#elif defined(USE_MBEDTLS)
+#  include <mbedtls/md4.h>
+#  if defined(MBEDTLS_MD4_C)
+#define USE_NTLM
+#  endif
+
 #endif
 #endif