summaryrefslogtreecommitdiffstats
path: root/lib/http_ntlm.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2017-10-04 05:52:15 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-10 15:15:03 (GMT)
commitde7c21d677db1ddaeece03c19e13e448f4031511 (patch)
treef812bbd3771bd01de9f7cd91a557766605f6ed2c /lib/http_ntlm.c
parent06d6d6c4aee149cd6560b919ef6935ef0867d921 (diff)
downloadCMake-de7c21d677db1ddaeece03c19e13e448f4031511.zip
CMake-de7c21d677db1ddaeece03c19e13e448f4031511.tar.gz
CMake-de7c21d677db1ddaeece03c19e13e448f4031511.tar.bz2
curl 2017-10-04 (3ea76790)
Code extracted from: https://github.com/curl/curl.git at commit 3ea76790571c1f7cf1bed34fabffd3cc20ad3dd3 (curl-7_56_0).
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r--lib/http_ntlm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 8a78bd2..0f1edcf 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, 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
@@ -37,11 +37,14 @@
#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"
-#if defined(USE_NSS)
+/* SSL backend-specific #if branches in this file must be kept in the order
+ documented in curl_ntlm_core. */
+#if defined(NTLM_NEEDS_NSS_INIT)
#include "vtls/nssg.h"
#elif defined(USE_WINDOWS_SSPI)
#include "curl_sspi.h"
@@ -129,7 +132,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
DEBUGASSERT(conn);
DEBUGASSERT(conn->data);
-#ifdef USE_NSS
+#if defined(NTLM_NEEDS_NSS_INIT)
if(CURLE_OK != Curl_nss_force_init(conn->data))
return CURLE_OUT_OF_MEMORY;
#endif
@@ -170,8 +173,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
case NTLMSTATE_TYPE1:
default: /* for the weird cases we (re)start here */
/* Create a type-1 message */
- result = Curl_auth_create_ntlm_type1_message(userp, passwdp, ntlm, &base64,
- &len);
+ result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp,
+ ntlm, &base64, &len);
if(result)
return result;