aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2015-01-27 17:24:55 +0100
committerPatrick Monnerat <pm@datasphere.ch>2015-01-27 17:24:55 +0100
commit0d24f644735924524bcffff75ace4bd7b7a2e05a (patch)
tree7021e64d949bb2bcec90a3adc8f9c2314c94cec6 /lib/smtp.c
parente1bb13c09f8d4cb8d1499fc9f51734729cdcdf2c (diff)
sasl: implement EXTERNAL authentication mechanism.
Its use is only enabled by explicit requirement in URL (;AUTH=EXTERNAL) and by not setting the password.
Diffstat (limited to 'lib/smtp.c')
-rw-r--r--lib/smtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index ca1ab2cec..550725a93 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -486,9 +486,10 @@ static CURLcode smtp_perform_authentication(struct connectdata *conn)
struct smtp_conn *smtpc = &conn->proto.smtpc;
saslprogress progress;
- /* Check we have a username and password to authenticate with, and the
+ /* Check we have enough data to authenticate with, and the
server supports authentiation, and end the connect phase if not */
- if(!conn->bits.user_passwd || !smtpc->auth_supported) {
+ if(!smtpc->auth_supported ||
+ !Curl_sasl_can_authenticate(&smtpc->sasl, conn)) {
state(conn, SMTP_STOP);
return result;
}