aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-17 00:20:42 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-17 00:20:42 +0000
commitb3440f490f80b78733412d48e6c23a9cc71033ca (patch)
tree0ed63e89bdf22e4802a3afa7c7b9d9239af2e49e
parent2dd56991f736faac3f5c471b559711623d3766ed (diff)
imap: Fixed incorrect initial response generation for SASL AUTHENTICATE
Fixed incorrect initial response generation for the NTLM and LOGIN SASL authentication mechanisms when the SASL-IR was detected. Introduced in commit: 6da7dc026c14.
-rw-r--r--lib/imap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 25067c7b9..f5bd0fba4 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -673,8 +673,9 @@ static CURLcode imap_perform_authenticate(struct connectdata *conn)
imapc->authused = SASL_MECH_NTLM;
if(imapc->ir_supported)
- result = Curl_sasl_create_login_message(conn->data, conn->user,
- &initresp, &len);
+ result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+ &conn->ntlm,
+ &initresp, &len);
}
else
#endif
@@ -685,8 +686,8 @@ static CURLcode imap_perform_authenticate(struct connectdata *conn)
imapc->authused = SASL_MECH_LOGIN;
if(imapc->ir_supported)
- result = Curl_sasl_create_plain_message(conn->data, conn->user,
- conn->passwd, &initresp, &len);
+ result = Curl_sasl_create_login_message(conn->data, conn->user,
+ &initresp, &len);
}
else if(imapc->authmechs & SASL_MECH_PLAIN) {
mech = "PLAIN";
@@ -703,8 +704,8 @@ static CURLcode imap_perform_authenticate(struct connectdata *conn)
return result;
if(mech) {
+ /* Perform SASL based authentication */
if(initresp) {
- /* Perform SASL based authentication */
result = imap_sendf(conn, "AUTHENTICATE %s %s", mech, initresp);
if(!result)