summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/http_ntlm.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-21 13:52:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-05-21 13:53:06 (GMT)
commit722056372e4ae640c1e61ac1dabfdd8a2737a35f (patch)
tree505f7457bc70f8f72d161e2c4660b6387713a702 /Utilities/cmcurl/lib/http_ntlm.c
parent4d6f4500dfbb4ea46c0ee8b736979305d3e9c0d8 (diff)
parent3e913b819d8d8118d5e8dc3b7289f622e9ca92e5 (diff)
downloadCMake-722056372e4ae640c1e61ac1dabfdd8a2737a35f.zip
CMake-722056372e4ae640c1e61ac1dabfdd8a2737a35f.tar.gz
CMake-722056372e4ae640c1e61ac1dabfdd8a2737a35f.tar.bz2
Merge topic 'update-curl'
3e913b819d Merge branch 'upstream-curl' into update-curl d431136e02 curl 2018-05-15 (cb013830) f3c73b878c curl: Update script to get curl 7.60.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2091
Diffstat (limited to 'Utilities/cmcurl/lib/http_ntlm.c')
-rw-r--r--Utilities/cmcurl/lib/http_ntlm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Utilities/cmcurl/lib/http_ntlm.c b/Utilities/cmcurl/lib/http_ntlm.c
index 0f1edcf..fd5540b 100644
--- a/Utilities/cmcurl/lib/http_ntlm.c
+++ b/Utilities/cmcurl/lib/http_ntlm.c
@@ -121,9 +121,11 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
server, which is for a plain host or for a HTTP proxy */
char **allocuserpwd;
- /* point to the name and password for this */
+ /* point to the username, password, service and host */
const char *userp;
const char *passwdp;
+ const char *service = NULL;
+ const char *hostname = NULL;
/* point to the correct struct with this */
struct ntlmdata *ntlm;
@@ -141,6 +143,9 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
allocuserpwd = &conn->allocptr.proxyuserpwd;
userp = conn->http_proxy.user;
passwdp = conn->http_proxy.passwd;
+ service = conn->data->set.str[STRING_PROXY_SERVICE_NAME] ?
+ conn->data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
+ hostname = conn->http_proxy.host.name;
ntlm = &conn->proxyntlm;
authp = &conn->data->state.authproxy;
}
@@ -148,6 +153,9 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
allocuserpwd = &conn->allocptr.userpwd;
userp = conn->user;
passwdp = conn->passwd;
+ service = conn->data->set.str[STRING_SERVICE_NAME] ?
+ conn->data->set.str[STRING_SERVICE_NAME] : "HTTP";
+ hostname = conn->host.name;
ntlm = &conn->ntlm;
authp = &conn->data->state.authhost;
}
@@ -174,7 +182,9 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
default: /* for the weird cases we (re)start here */
/* Create a type-1 message */
result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp,
- ntlm, &base64, &len);
+ service, hostname,
+ ntlm, &base64,
+ &len);
if(result)
return result;