sasl: implement EXTERNAL authentication mechanism.

Its use is only enabled by explicit requirement in URL (;AUTH=EXTERNAL) and
by not setting the password.
This commit is contained in:
Patrick Monnerat
2015-01-27 17:24:55 +01:00
parent e1bb13c09f
commit 0d24f64473
5 changed files with 135 additions and 75 deletions

View File

@@ -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;
}