Changed the SMTP_AUTH_PASSWD state constant to SMTP_AUTH_LOGIN_PASSWD to
better describe the state as the second part of an AUTH LOGIN command,
as well as for consistency with the imap and pop3 modules.
"UPGRADETLS",
"AUTH_PLAIN",
"AUTH_LOGIN",
"UPGRADETLS",
"AUTH_PLAIN",
"AUTH_LOGIN",
"AUTH_CRAMMD5",
"AUTH_DIGESTMD5",
"AUTH_DIGESTMD5_RESP",
"AUTH_CRAMMD5",
"AUTH_DIGESTMD5",
"AUTH_DIGESTMD5_RESP",
if(smtpc->authmechs & SASL_MECH_LOGIN) {
mech = "LOGIN";
state1 = SMTP_AUTH_LOGIN;
if(smtpc->authmechs & SASL_MECH_LOGIN) {
mech = "LOGIN";
state1 = SMTP_AUTH_LOGIN;
- state2 = SMTP_AUTH_PASSWD;
+ state2 = SMTP_AUTH_LOGIN_PASSWD;
smtpc->authused = SASL_MECH_LOGIN;
result = Curl_sasl_create_login_message(conn->data, conn->user,
&initresp, &len);
smtpc->authused = SASL_MECH_LOGIN;
result = Curl_sasl_create_login_message(conn->data, conn->user,
&initresp, &len);
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
if(!result)
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
if(!result)
- state(conn, SMTP_AUTH_PASSWD);
+ state(conn, SMTP_AUTH_LOGIN_PASSWD);
}
Curl_safefree(authuser);
}
Curl_safefree(authuser);
-/* For responses to user entry of AUTH LOGIN */
+/* For AUTH LOGIN user entry responses */
static CURLcode smtp_state_auth_passwd_resp(struct connectdata *conn,
int smtpcode,
smtpstate instate)
static CURLcode smtp_state_auth_passwd_resp(struct connectdata *conn,
int smtpcode,
smtpstate instate)
result = smtp_state_auth_login_resp(conn, smtpcode, smtpc->state);
break;
result = smtp_state_auth_login_resp(conn, smtpcode, smtpc->state);
break;
+ case SMTP_AUTH_LOGIN_PASSWD:
result = smtp_state_auth_passwd_resp(conn, smtpcode, smtpc->state);
break;
result = smtp_state_auth_passwd_resp(conn, smtpcode, smtpc->state);
break;
(multi mode only) */
SMTP_AUTH_PLAIN,
SMTP_AUTH_LOGIN,
(multi mode only) */
SMTP_AUTH_PLAIN,
SMTP_AUTH_LOGIN,
+ SMTP_AUTH_LOGIN_PASSWD,
SMTP_AUTH_CRAMMD5,
SMTP_AUTH_DIGESTMD5,
SMTP_AUTH_DIGESTMD5_RESP,
SMTP_AUTH_CRAMMD5,
SMTP_AUTH_DIGESTMD5,
SMTP_AUTH_DIGESTMD5_RESP,