diff -ruX /home/mccreed/exclude curl-7.15.5-20060726/docs/curl.1 curlinux/docs/curl.1 --- curl-7.15.5-20060726/docs/curl.1 2006-07-25 22:00:41.000000000 -0400 +++ curlinux/docs/curl.1 2006-07-26 17:12:15.481696000 -0400 @@ -412,7 +412,15 @@ If this option is used twice, the second will again use the server's suggested address. .IP "--ftp-ssl" -(FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0) +(FTP) Try to use SSL/TLS for the FTP connection. +Reverts to a non-secure connection if the server doesn't support SSL/TLS. +(Added in 7.11.0) + +If this option is used twice, the second will again disable this. +.IP "--ftp-ssl-reqd" +(FTP) Require SSL/TLS for the FTP connection. +Terminates the connection if the server doesn't support SSL/TLS. +(Added in 7.15.5) If this option is used twice, the second will again disable this. .IP "-F/--form " diff -ruX /home/mccreed/exclude curl-7.15.5-20060726/src/main.c curlinux/src/main.c --- curl-7.15.5-20060726/src/main.c 2006-07-25 22:00:46.000000000 -0400 +++ curlinux/src/main.c 2006-07-26 16:02:38.000000000 -0400 @@ -338,6 +338,7 @@ struct timeval lastrecvtime; size_t lastrecvsize; bool ftp_ssl; + bool ftp_ssl_reqd; char *socksproxy; /* set to server string */ int socksver; /* set to CURLPROXY_SOCKS* define */ @@ -516,7 +517,8 @@ " --ftp-method [multicwd/nocwd/singlecwd] Control CWD usage (F)", " --ftp-pasv Use PASV/EPSV instead of PORT (F)", " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n" - " --ftp-ssl Enable SSL/TLS for the ftp transfer (F)", + " --ftp-ssl Try SSL/TLS for the ftp transfer (F)", + " --ftp-ssl-reqd Require SSL/TLS for the ftp transfer (F)", " -F/--form Specify HTTP multipart POST data (H)", " --form-string Specify HTTP multipart POST data (H)", " -g/--globoff Disable URL sequences and ranges using {} and []", @@ -1342,6 +1344,7 @@ {"$s", "local-port", TRUE}, {"$t", "socks4", TRUE}, {"$u", "ftp-alternative-to-user", TRUE}, + {"$v", "ftp-ssl-reqd", FALSE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, @@ -1781,6 +1784,9 @@ case 'u': /* --ftp-alternative-to-user */ GetStr(&config->ftp_alternative_to_user, nextarg); break; + case 'v': /* --ftp-ssl-reqd */ + config->ftp_ssl_reqd ^= TRUE; + break; } break; case '#': /* --progress-bar */ @@ -3975,6 +3981,10 @@ if(config->ftp_ssl) curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); + /* new in curl 7.15.5 */ + if(config->ftp_ssl_reqd) + curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_ALL); + /* new in curl 7.11.1, modified in 7.15.2 */ if(config->socksproxy) { curl_easy_setopt(curl, CURLOPT_PROXY, config->socksproxy);