aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index b53f8f309..86d37eafc 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2430,8 +2430,14 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
result = Curl_nbftpsendf(conn, "AUTH %s", ftpauth[ftp->count1]);
/* remain in this same state */
}
- else
- result = ftp_state_user(conn);
+ else {
+ if(data->set.ftp_ssl > CURLFTPSSL_TRY)
+ /* we failed and CURLFTPSSL_CONTROL or CURLFTPSSL_ALL is set */
+ result = CURLE_FTP_SSL_FAILED;
+ else
+ /* ignore the failure and continue */
+ result = ftp_state_user(conn);
+ }
if(result)
return result;