aboutsummaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-02-04 23:51:36 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-02-04 23:51:36 +0000
commit022e67294eb6b39f8d2554abc178a1328e8b9cd5 (patch)
treeb0b4a23409b258f28e54addffe6f93057cc42410 /lib/pop3.c
parent7fd5f680ea5cb0962c897977e427464858bff151 (diff)
email: Provided extra comments following recent pop3/imap fixes
Provided additional clarification about the logic of the authenticate() functions following commit 6b6bdc83bd36 and b4270a9af1d0.
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 395c39d21..e9eeb3a8a 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -458,7 +458,7 @@ static CURLcode pop3_authenticate(struct connectdata *conn)
const char *mech = NULL;
pop3state authstate = POP3_STOP;
- /* Check supported authentication mechanisms by decreasing order of
+ /* Calculate the supported authentication mechanism by decreasing order of
security */
if(pop3c->authtypes & POP3_TYPE_SASL) {
#ifndef CURL_DISABLE_CRYPTO_AUTH
@@ -495,6 +495,7 @@ static CURLcode pop3_authenticate(struct connectdata *conn)
}
if(mech) {
+ /* Perform SASL based authentication */
result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech);
if(!result)
@@ -502,13 +503,16 @@ static CURLcode pop3_authenticate(struct connectdata *conn)
}
#ifndef CURL_DISABLE_CRYPTO_AUTH
else if(pop3c->authtypes & POP3_TYPE_APOP)
+ /* Perform APOP authentication */
result = pop3_state_apop(conn);
#endif
else if(pop3c->authtypes & POP3_TYPE_CLEARTEXT)
+ /* Perform clear text authentication */
result = pop3_state_user(conn);
else {
+ /* Other mechanisms not supported */
infof(conn->data, "No known authentication mechanisms supported!\n");
- result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported */
+ result = CURLE_LOGIN_DENIED;
}
return result;