1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

Fixed incorrect error code being returned in STARTTLS

The STARTTLS response code in SMTP, POP3 and IMAP would return
CURLE_LOGIN_DENIED rather than CURLE_USE_SSL_FAILED when SSL/TLS
was not available on the server.

Reported by: Gokhan Sengun
Bug: http://curl.haxx.se/mail/lib-2012-01/0018.html
This commit is contained in:
Steve Holme 2012-01-03 23:01:51 +00:00 committed by Daniel Stenberg
parent 0f8239d5b4
commit 277022b2e4
3 changed files with 3 additions and 3 deletions

View File

@ -355,7 +355,7 @@ static CURLcode imap_state_starttls_resp(struct connectdata *conn,
if(imapcode != 'O') {
failf(data, "STARTTLS denied. %c", imapcode);
result = CURLE_LOGIN_DENIED;
result = CURLE_USE_SSL_FAILED;
}
else {
if(data->state.used_interface == Curl_if_multi) {

View File

@ -299,7 +299,7 @@ static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
if(pop3code != 'O') {
failf(data, "STARTTLS denied. %c", pop3code);
result = CURLE_LOGIN_DENIED;
result = CURLE_USE_SSL_FAILED;
state(conn, POP3_STOP);
}
else {

View File

@ -510,7 +510,7 @@ static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
if(smtpcode != 220) {
if(data->set.use_ssl != CURLUSESSL_TRY) {
failf(data, "STARTTLS denied. %c", smtpcode);
result = CURLE_LOGIN_DENIED;
result = CURLE_USE_SSL_FAILED;
}
else
result = smtp_authenticate(conn);