From fe20826b580aa221f8f796cba236d08dc0fd80fd Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 15 May 2019 16:10:56 +0100 Subject: 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 --- lib/http.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'lib/http.c') 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 -- cgit v1.2.3