diff options
author | Joe Mason <jmason@rim.com> | 2012-08-03 12:37:52 -0400 |
---|---|---|
committer | Joe Mason <jmason@rim.com> | 2012-08-03 17:01:54 -0400 |
commit | 50b87c4e689088fc3ddcf2fac163b75f839ef69a (patch) | |
tree | a5f60ca1115908cb9c0e233a315898164ca249b3 | |
parent | ce8311c7e49eca93c136b58efa6763853541ec97 (diff) |
Cleanup handshake after clean NTLM failure
-rw-r--r-- | lib/curl_ntlm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c index c7d67a0de..9c7837254 100644 --- a/lib/curl_ntlm.c +++ b/lib/curl_ntlm.c @@ -95,7 +95,13 @@ CURLcode Curl_input_ntlm(struct connectdata *conn, ntlm->state = NTLMSTATE_TYPE2; /* We got a type-2 message */ } else { - if(ntlm->state >= NTLMSTATE_TYPE1) { + if(ntlm->state == NTLMSTATE_TYPE3) { + infof(conn->data, "NTLM handshake rejected\n"); + Curl_http_ntlm_cleanup(conn); + ntlm->state = NTLMSTATE_NONE; + return CURLE_REMOTE_ACCESS_DENIED; + } + else if(ntlm->state >= NTLMSTATE_TYPE1) { infof(conn->data, "NTLM handshake failure (internal error)\n"); return CURLE_REMOTE_ACCESS_DENIED; } |