]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
define: re-add CURL_DISABLE_NTLM and corresponding ifdefs
authortheawless <theawless@gmail.com>
Fri, 7 May 2021 07:28:50 +0000 (12:58 +0530)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 2 Jun 2021 06:55:00 +0000 (08:55 +0200)
This flag will be further exposed by adding build options.

Reverts #6809
Closes #7028

docs/CURL-DISABLE.md
lib/config-vxworks.h
lib/curl_setup.h
packages/vms/generate_config_vms_h_curl.com

index 3aa9608f8f27532bbb833ee9b62989b43a534943..5967d7b79c3406b088a9b4f163e0cd7de93dadb2 100644 (file)
@@ -12,6 +12,10 @@ Disable support for HTTP cookies.
 
 Disable support for authentication methods using crypto.
 
+## CURL_DISABLE_NTLM
+
+Disable support for NTLM.
+
 ## CURL_DISABLE_DICT
 
 Disable the DICT protocol
index 8911b05e24d7ce43d66aeb7a55f83d6cd611071e..dc46373be1d5f3c8e83dff9f90e843cc23e241f3 100644 (file)
@@ -56,6 +56,9 @@
 /* to disable LDAPS */
 #define CURL_DISABLE_LDAPS 1
 
+/* to disable NTLM authentication */
+#define CURL_DISABLE_NTLM 1
+
 /* to disable proxies */
 /* #undef CURL_DISABLE_PROXY */
 
index be4a58d4b624989129a670f5ac15aed750218cc1..0b575ef78b8efbb413a61af04218c15690812f8f 100644 (file)
@@ -644,24 +644,20 @@ int netware_init(void);
 #endif
 
 /* Single point where USE_NTLM definition might be defined */
-#ifndef CURL_DISABLE_CRYPTO_AUTH
-#if defined(USE_OPENSSL) || defined(USE_MBEDTLS) ||                     \
-  defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_SECTRANSP) ||  \
-  defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) ||              \
-  (defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT))
-
-#define USE_CURL_NTLM_CORE
-
-#  if defined(USE_MBEDTLS)
-/* Get definition of MBEDTLS_MD4_C */
-#  include <mbedtls/md4.h>
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) && !defined(CURL_DISABLE_NTLM)
+#  if defined(USE_OPENSSL) || defined(USE_MBEDTLS) ||                       \
+      defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_SECTRANSP) ||  \
+      defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) ||              \
+      (defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT))
+#    define USE_CURL_NTLM_CORE
+#    if defined(USE_MBEDTLS)
+       /* Get definition of MBEDTLS_MD4_C */
+#      include <mbedtls/md4.h>
+#    endif
+#  endif
+#  if defined(USE_CURL_NTLM_CORE) || defined(USE_WINDOWS_SSPI)
+#    define USE_NTLM
 #  endif
-
-#endif
-
-#if defined(USE_CURL_NTLM_CORE) || defined(USE_WINDOWS_SSPI)
-#define USE_NTLM
-#endif
 #endif
 
 #ifdef CURL_WANTS_CA_BUNDLE_ENV
index fbcb4d0dd0aeeee133c4e5fb9304b02bfbe6733b..07d3fb0890429c863fcae98475edc710ba9e1233 100644 (file)
@@ -278,9 +278,15 @@ $write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
 $write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
 $write cvh "#endif"
 $write cvh "#ifndef __VAX"
+$write cvh "#ifdef CURL_DISABLE_NTLM"
+$write cvh "#undef CURL_DISABLE_NTLM"
+$write cvh "#endif"
 $write cvh "#else"
 $! NTLM needs long long or int64 support, missing from DECC C.
 $write cvh "#ifdef __DECC
+$write cvh "#ifndef CURL_DISABLE_NTLM"
+$write cvh "#define CURL_DISABLE_NTLM 1"
+$write cvh "#endif"
 $write cvh "#endif"
 $write cvh "#endif"
 $write cvh "#ifdef CURL_DISABLE_POP3"