]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLFTPSSL_ALL should make sure that the transfer fails if the data connection
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Dec 2004 10:00:20 +0000 (10:00 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Dec 2004 10:00:20 +0000 (10:00 +0000)
isn't set to encrypted properly

lib/ftp.c

index cc667acdb9749e3f57c1a999e7b771b53be19f87..a43ee705112f2be3f2f2f72d8ab8331c3d166e34 100644 (file)
--- 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;
     }
   }