summaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2019-05-15 16:10:56 +0100
committerSteve Holme <steve_holme@hotmail.com>2019-05-16 00:03:30 +0100
commitfe20826b580aa221f8f796cba236d08dc0fd80fd (patch)
tree6ed2951863f6f44b8b99f91dfa2bc7098304f90d /lib/http.c
parentab4616f8cb4b2a736170ad70c03b6ab7347e63fe (diff)
downloadcurl-fe20826b580aa221f8f796cba236d08dc0fd80fd.tar.gz
http_ntlm_wb: Move the type-2 message processing into a dedicated function
This brings the code inline with the other HTTP authentication mechanisms. Closes #3890
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/http.c b/lib/http.c
index 222f7f53d..68259f817 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -919,19 +919,10 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
*availp |= CURLAUTH_NTLM_WB;
authp->avail |= CURLAUTH_NTLM_WB;
- /* Get the challenge-message which will be passed to
- * ntlm_auth for generating the type 3 message later */
- while(*auth && ISSPACE(*auth))
- auth++;
- if(checkprefix("NTLM", auth)) {
- auth += strlen("NTLM");
- while(*auth && ISSPACE(*auth))
- auth++;
- if(*auth) {
- conn->challenge_header = strdup(auth);
- if(!conn->challenge_header)
- return CURLE_OUT_OF_MEMORY;
- }
+ result = Curl_input_ntlm_wb(conn, proxy, auth);
+ if(result) {
+ infof(data, "Authentication problem. Ignoring this.\n");
+ data->state.authproblem = TRUE;
}
}
#endif