Commit 520dc643 authored by Steve Holme's avatar Steve Holme
Browse files

build: Fixed no NTLM support for email when CURL_DISABLE_HTTP is defined

USE_NTLM would only be defined if: HTTP support was enabled, NTLM and
cryptography weren't disabled, and either a supporting cryptography
library or Windows SSPI was being compiled against.

This means it was not possible to build libcurl without HTTP support
and use NTLM for other protocols such as IMAP, POP3 and SMTP. Rather
than introduce a new SASL pre-processor definition, removed the HTTP
prerequisite just like USE_SPNEGO and USE_KRB5.

Note: Winbind support still needs to be dependent on CURL_DISABLE_HTTP
as it is only available to HTTP at present.

This bug dates back to August 2011 when I started to add support for
NTLM to SMTP.
parent 8145f92d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

#include "curl_setup.h"

#ifdef USE_NTLM
#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)

/*
 * NTLM details:
@@ -237,4 +237,4 @@ void Curl_http_ntlm_cleanup(struct connectdata *conn)
#endif
}

#endif /* USE_NTLM */
#endif /* !CURL_DISABLE_HTTP && USE_NTLM */
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#include "curl_setup.h"

#ifdef USE_NTLM
#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)

/* this is for ntlm header input */
CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy,
@@ -35,6 +35,6 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);

void Curl_http_ntlm_cleanup(struct connectdata *conn);

#endif
#endif /* !CURL_DISABLE_HTTP && USE_NTLM */

#endif /* HEADER_CURL_NTLM_H */
+3 −2
Original line number Diff line number Diff line
@@ -22,7 +22,8 @@

#include "curl_setup.h"

#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \
    defined(NTLM_WB_ENABLED)

/*
 * NTLM details:
@@ -432,4 +433,4 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn,
  return CURLE_OK;
}

#endif /* USE_NTLM && NTLM_WB_ENABLED */
#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */
+4 −3
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -24,7 +24,8 @@

#include "curl_setup.h"

#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \
    defined(NTLM_WB_ENABLED)

/* this is for creating ntlm header output by delegating challenge/response
   to Samba's winbind daemon helper ntlm_auth */
@@ -32,6 +33,6 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy);

void Curl_ntlm_wb_cleanup(struct connectdata *conn);

#endif /* USE_NTLM && NTLM_WB_ENABLED */
#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */

#endif /* HEADER_CURL_NTLM_WB_H */
+1 −2
Original line number Diff line number Diff line
@@ -620,8 +620,7 @@ int netware_init(void);
#endif

/* Single point where USE_NTLM definition might be defined */
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM) && \
    !defined(CURL_DISABLE_CRYPTO_AUTH)
#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH)
#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
    defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL)
#define USE_NTLM
Loading