aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-12-07 10:00:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-12-07 10:00:20 +0000
commitc78ee11c41e2692909d0e8b30d65b46de50caf47 (patch)
treee89c1695f363b4b0ed9c16e88a619e3d7ae0c2e2
parent4435e3b269606107f90adb3e1b842e439029b6b3 (diff)
CURLFTPSSL_ALL should make sure that the transfer fails if the data connection
isn't set to encrypted properly
-rw-r--r--lib/ftp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index cc667acdb..a43ee7051 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -677,12 +677,14 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
if(result)
return result;
- if(ftpcode == 200)
+ if(ftpcode/100 == 2)
/* We have enabled SSL for the data connection! */
conn->ssl[SECONDARYSOCKET].use = TRUE;
-
/* FTP servers typically responds with 500 if they decide to reject
our 'P' request */
+ else if(data->set.ftp_ssl> CURLFTPSSL_CONTROL)
+ /* we failed and bails out */
+ return CURLE_FTP_SSL_FAILED;
}
}