From 2c93ec5303f0a3d46d10dbcee98e46a0b413a59b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 2 Jan 2010 22:09:31 +0000 Subject: [PATCH] - Make curl support --ssl and --ssl-reqd instead of the previous FTP-specific versions --ftp-ssl and --ftp-ssl-reqd as these options are now used to control SSL/TLS for IMAP, POP3 and SMTP as well in addition to FTP. The old option names are still working but the new ones are the prefered ones (listed and documented). --- CHANGES | 7 +++++++ RELEASE-NOTES | 1 + docs/curl.1 | 25 +++++++++++++++---------- src/main.c | 12 ++++++++---- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 374d103d1..4abc73c37 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,13 @@ Changelog +Daniel Stenberg (2 Jan 2010) +- Make curl support --ssl and --ssl-reqd instead of the previous FTP-specific + versions --ftp-ssl and --ftp-ssl-reqd as these options are now used to + control SSL/TLS for IMAP, POP3 and SMTP as well in addition to FTP. The old + option names are still working but the new ones are the ones listed and + documented. + Daniel Stenberg (1 Jan 2010) - Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This command is a special "hack" used by the drftpd server, but even though it is diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2f26f2a94..46b93e8e6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -17,6 +17,7 @@ This release includes the following changes: o added --mail-from and --mail-rcpt for SMTP o VMS build system enhancements o added support for the PRET ftp command + o curl supports --ssl and --ssl-reqd This release includes the following bugfixes: diff --git a/docs/curl.1 b/docs/curl.1 index 27f81f276..35b4e6330 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -466,19 +466,24 @@ This option has no effect if PORT, EPRT or EPSV is used instead of PASV. FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x) -.IP "--ftp-ssl" -(FTP) Try to use SSL/TLS for the FTP connection. Reverts to a non-secure -connection if the server doesn't support SSL/TLS. See also -\fI--ftp-ssl-control\fP and \fI--ftp-ssl-reqd\fP for different levels of -encryption required. (Added in 7.11.0) +.IP "--ssl" +(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a +non-secure connection if the server doesn't support SSL/TLS. See also +\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of +encryption required. (Added in 7.20.0) + +This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0) and that +can still be used but will be removed in a future version. .IP "--ftp-ssl-control" (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure authentication, but non-encrypted data transfers for efficiency. Fails the transfer if the server doesn't support SSL/TLS. (Added in 7.16.0) -.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) +.IP "--ssl-reqd" +(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the +connection if the server doesn't support SSL/TLS. (Added in 7.20.0) + +This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5) and +that can still be used but will be removed in a future version. .IP "--ftp-ssl-ccc" (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the diff --git a/src/main.c b/src/main.c index 7f417f59c..fefa2016f 100644 --- a/src/main.c +++ b/src/main.c @@ -796,11 +796,9 @@ static void help(void) " -P/--ftp-port
Use PORT with address instead of PASV (F)", " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n" " --ftp-pret Send PRET before PASV (for drftpd) (F)", - " --ftp-ssl Try SSL/TLS for ftp transfer (F)", " --ftp-ssl-ccc Send CCC after authenticating (F)", " --ftp-ssl-ccc-mode [active/passive] Set CCC mode (F)", " --ftp-ssl-control Require SSL/TLS for ftp login, clear for transfer (F)", - " --ftp-ssl-reqd Require SSL/TLS for ftp transfer (F)", " -G/--get Send the -d data with a HTTP GET (H)", " -g/--globoff Disable URL sequences and ranges using {} and []", " -H/--header Custom header to pass to server (H)", @@ -878,6 +876,8 @@ static void help(void) #endif " -Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs", " -y/--speed-time Time needed to trig speed-limit abort. Defaults to 30", + " --ssl Try SSL/TLS (FTP, IMAP, POP3, SMTP)", + " --ssl-reqd Require SSL/TLS (FTP, IMAP, POP3, SMTP)", " -2/--sslv2 Use SSLv2 (SSL)", " -3/--sslv3 Use SSLv3 (SSL)", " --stderr Where to redirect stderr. - means stdout", @@ -1703,7 +1703,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"*Z", "eprt", FALSE}, /* made like this to make --no-eprt and --eprt to work although --disable-eprt is the documented option */ - {"$a", "ftp-ssl", FALSE}, + {"$a", "ftp-ssl", FALSE}, /* deprecated name since 7.20.0 */ + {"$a", "ssl", FALSE}, /* new option name in 7.20.0, previously this + was ftp-ssl */ {"$b", "ftp-pasv", FALSE}, {"$c", "socks5", TRUE}, {"$c", "socks", TRUE}, /* this is how the option once was documented @@ -1726,7 +1728,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"$t", "socks4", TRUE}, {"$T", "socks4a", TRUE}, {"$u", "ftp-alternative-to-user", TRUE}, - {"$v", "ftp-ssl-reqd", FALSE}, + {"$v", "ftp-ssl-reqd", FALSE}, /* deprecated name since 7.20.0 */ + {"$v", "ssl-reqd", FALSE}, /* new option name in 7.20.0, previously this + was ftp-ssl-reqd */ {"$w", "sessionid", FALSE}, /* listed as --no-sessionid in the help */ {"$x", "ftp-ssl-control", FALSE}, {"$y", "ftp-ssl-ccc", FALSE},