From 0d24f644735924524bcffff75ace4bd7b7a2e05a Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 27 Jan 2015 17:24:55 +0100 Subject: sasl: implement EXTERNAL authentication mechanism. Its use is only enabled by explicit requirement in URL (;AUTH=EXTERNAL) and by not setting the password. --- lib/imap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/imap.c') diff --git a/lib/imap.c b/lib/imap.c index c5c8e4aea..2d037eeb3 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -612,9 +612,9 @@ static CURLcode imap_perform_authentication(struct connectdata *conn) struct imap_conn *imapc = &conn->proto.imapc; saslprogress progress; - /* Check we have a username and password to authenticate with and end the + /* Check we have enough data to authenticate with and end the connect phase if we don't */ - if(!conn->bits.user_passwd) { + if(!Curl_sasl_can_authenticate(&imapc->sasl, conn)) { state(conn, IMAP_STOP); return result; } @@ -1962,7 +1962,7 @@ static CURLcode imap_parse_url_options(struct connectdata *conn) case SASL_AUTH_NONE: imapc->preftype = IMAP_TYPE_NONE; break; - case SASL_AUTH_ANY: + case SASL_AUTH_DEFAULT: imapc->preftype = IMAP_TYPE_ANY; break; default: -- cgit v1.2.3