summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-09-22 15:47:14 -0400
committerJay Satiro <raysatiro@yahoo.com>2017-09-23 13:58:14 -0400
commit953b5c4e2602711c031a4f6cd024051a72329015 (patch)
treefdecee4fc5d80a599bdbca662cd83cfa0915de22
parentafbdc96638a769d9bee8579d8b70f54537f5e891 (diff)
downloadcurl-953b5c4e2602711c031a4f6cd024051a72329015.tar.gz
ntlm: move NTLM_NEEDS_NSS_INIT define into core NTLM header
.. and include the core NTLM header in all NTLM-related source files. Follow up to 6f86022. Since then http_ntlm checks NTLM_NEEDS_NSS_INIT but did not include vtls.h where it was defined. Closes https://github.com/curl/curl/pull/1911
-rw-r--r--lib/curl_ntlm_core.h9
-rw-r--r--lib/curl_ntlm_wb.c1
-rw-r--r--lib/http_ntlm.c1
-rw-r--r--lib/vauth/ntlm_sspi.c1
-rw-r--r--lib/vtls/vtls.h9
5 files changed, 12 insertions, 9 deletions
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
index 21d09b78e..07ef5deae 100644
--- a/lib/curl_ntlm_core.h
+++ b/lib/curl_ntlm_core.h
@@ -26,6 +26,15 @@
#if defined(USE_NTLM)
+/* If NSS is the first available SSL backend (see order in curl_ntlm_core.c)
+ then it must be initialized to be used by NTLM. */
+#if !defined(USE_OPENSSL) && \
+ !defined(USE_GNUTLS_NETTLE) && \
+ !defined(USE_GNUTLS) && \
+ defined(USE_NSS)
+#define NTLM_NEEDS_NSS_INIT
+#endif
+
#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
#ifdef USE_OPENSSL
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index ac0e12456..03f47a3a5 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -48,6 +48,7 @@
#include "sendf.h"
#include "select.h"
#include "vauth/ntlm.h"
+#include "curl_ntlm_core.h"
#include "curl_ntlm_wb.h"
#include "url.h"
#include "strerror.h"
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 28e638e69..0f1edcf65 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -37,6 +37,7 @@
#include "sendf.h"
#include "strcase.h"
#include "http_ntlm.h"
+#include "curl_ntlm_core.h"
#include "curl_ntlm_wb.h"
#include "vauth/vauth.h"
#include "url.h"
diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c
index f99325710..e748ce3b6 100644
--- a/lib/vauth/ntlm_sspi.c
+++ b/lib/vauth/ntlm_sspi.c
@@ -29,6 +29,7 @@
#include "vauth/vauth.h"
#include "urldata.h"
#include "curl_base64.h"
+#include "curl_ntlm_core.h"
#include "warnless.h"
#include "curl_multibyte.h"
#include "sendf.h"
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
index b85b365e5..f1a11ea58 100644
--- a/lib/vtls/vtls.h
+++ b/lib/vtls/vtls.h
@@ -124,15 +124,6 @@ CURLcode Curl_none_md5sum(unsigned char *input, size_t inputlen,
#define ALPN_HTTP_1_1_LENGTH 8
#define ALPN_HTTP_1_1 "http/1.1"
-/* If NTLM is the first available SSL backend (see order in curl_ntlm_core)
- then it must be initialized to be used by NTLM. */
-#if !defined(USE_OPENSSL) && \
- !defined(USE_GNUTLS_NETTLE) && \
- !defined(USE_GNUTLS) && \
- defined(USE_NSS)
-#define NTLM_NEEDS_NSS_INIT
-#endif
-
/* set of helper macros for the backends to access the correct fields. For the
proxy or for the remote host - to properly support HTTPS proxy */