diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2006-09-23 19:37:23 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-23 19:37:23 +0000 | 
| commit | f7d31bb3e35c89feb3de34b77961523eab1f66d6 (patch) | |
| tree | 62665d084c16d21714a4401045de16f531383009 /src | |
| parent | 9cd928674f6a66b98a6d1581fa0aed5cf69c870b (diff) | |
Mike Protts added --ftp-ssl-control to make curl use FTP-SSL, but only
encrypt the control connection and use the data connection "plain".
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 18 | 
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index fda0f2bb4..2a433cae5 100644 --- a/src/main.c +++ b/src/main.c @@ -339,6 +339,7 @@ struct Configurable {    size_t lastrecvsize;    bool ftp_ssl;    bool ftp_ssl_reqd; +  bool ftp_ssl_control;    char *socksproxy; /* set to server string */    int socksver;     /* set to CURLPROXY_SOCKS* define */ @@ -519,6 +520,7 @@ static void help(void)      "    --ftp-pasv      Use PASV/EPSV instead of PORT (F)",      "    --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n"      "    --ftp-ssl       Try SSL/TLS for the ftp transfer (F)", +    "    --ftp-ssl-control Try SSL/TLS for the ftp login, clear for transfer (F)",      "    --ftp-ssl-reqd  Require SSL/TLS for the ftp transfer (F)",      " -F/--form <name=content> Specify HTTP multipart POST data (H)",      "    --form-string <name=string> Specify HTTP multipart POST data (H)", @@ -1351,6 +1353,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */      {"$u", "ftp-alternative-to-user", TRUE},      {"$v", "ftp-ssl-reqd", FALSE},      {"$w", "no-sessionid", FALSE}, +    {"$x", "ftp-ssl-control", FALSE},      {"0", "http1.0",     FALSE},      {"1", "tlsv1",       FALSE}, @@ -1801,6 +1804,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */        case 'w': /* --no-sessionid */          config->disable_sessionid ^= TRUE;          break; +      case 'x': /* --ftp-ssl-control */ +        config->ftp_ssl_control ^= TRUE; +        break;        }        break;      case '#': /* --progress-bar */ @@ -3991,14 +3997,18 @@ operate(struct Configurable *config, int argc, char *argv[])          else            curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER); -        /* new in curl 7.11.0 */ -        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.0 */ +        else if(config->ftp_ssl) +          curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); + +        /* new in curl 7.16.0 */ +        else if(config->ftp_ssl_control) +          curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_CONTROL); +          /* new in curl 7.11.1, modified in 7.15.2 */          if(config->socksproxy) {            curl_easy_setopt(curl, CURLOPT_PROXY, config->socksproxy);  | 
