define: re-add CURL_DISABLE_NTLM and corresponding ifdefs

This flag will be further exposed by adding build options.

Reverts #6809
Closes #7028
This commit is contained in:
theawless 2021-05-07 12:58:50 +05:30 committed by Daniel Stenberg
parent 68c71126f8
commit ee8c4f766c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
4 changed files with 26 additions and 17 deletions

View 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

View 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 */

View 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

View 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"