#include "retr.h"
#include "recur.h"
#include "host.h"
-#include "cookies.h"
#include "url.h"
#include "progress.h" /* for progress_handle_sigwinch */
#include "convert.h"
{ "backups", 0, OPT_BOOLEAN, "backups", -1 },
{ "base", 'B', OPT_VALUE, "base", -1 },
{ "bind-address", 0, OPT_VALUE, "bindaddress", -1 },
+ { IF_SSL ("ca-certificate"), 0, OPT_VALUE, "cacertificate", -1 },
+ { IF_SSL ("ca-directory"), 0, OPT_VALUE, "cadirectory", -1 },
{ "cache", 0, OPT_BOOLEAN, "cache", -1 },
+ { IF_SSL ("certificate"), 0, OPT_VALUE, "certificate", -1 },
+ { IF_SSL ("certificate-type"), 0, OPT_VALUE, "certificatetype", -1 },
+ { IF_SSL ("check-certificate"), 0, OPT_BOOLEAN, "checkcertificate", -1 },
{ "clobber", 0, OPT__CLOBBER, NULL, optional_argument },
{ "connect-timeout", 0, OPT_VALUE, "connecttimeout", -1 },
{ "continue", 'c', OPT_BOOLEAN, "continue", -1 },
{ "passive-ftp", 0, OPT_BOOLEAN, "passiveftp", -1 },
{ "post-data", 0, OPT_VALUE, "postdata", -1 },
{ "post-file", 0, OPT_VALUE, "postfile", -1 },
+ { "prefer-family", 0, OPT_VALUE, "preferfamily", -1 },
{ "preserve-permissions", 0, OPT_BOOLEAN, "preservepermissions", -1 },
+ { IF_SSL ("private-key"), 0, OPT_VALUE, "privatekey", -1 },
+ { IF_SSL ("private-key-type"), 0, OPT_VALUE, "privatekeytype", -1 },
{ "progress", 0, OPT_VALUE, "progress", -1 },
{ "protocol-directories", 0, OPT_BOOLEAN, "protocoldirectories", -1 },
- { "proxy", 'Y', OPT_BOOLEAN, "useproxy", -1 },
+ { "proxy", 0, OPT_BOOLEAN, "useproxy", -1 },
+ { "proxy__compat", 'Y', OPT_VALUE, "useproxy", -1 }, /* back-compatible */
{ "proxy-passwd", 0, OPT_VALUE, "proxypasswd", -1 },
{ "proxy-user", 0, OPT_VALUE, "proxyuser", -1 },
{ "quiet", 'q', OPT_BOOLEAN, "quiet", -1 },
{ "quota", 'Q', OPT_VALUE, "quota", -1 },
+ { "random-file", 0, OPT_VALUE, "randomfile", -1 },
{ "random-wait", 0, OPT_BOOLEAN, "randomwait", -1 },
{ "read-timeout", 0, OPT_VALUE, "readtimeout", -1 },
{ "recursive", 'r', OPT_BOOLEAN, "recursive", -1 },
{ "retry-connrefused", 0, OPT_BOOLEAN, "retryconnrefused", -1 },
{ "save-cookies", 0, OPT_VALUE, "savecookies", -1 },
{ "save-headers", 0, OPT_BOOLEAN, "saveheaders", -1 },
+ { IF_SSL ("secure-protocol"), 0, OPT_VALUE, "secureprotocol", -1 },
{ "server-response", 'S', OPT_BOOLEAN, "serverresponse", -1 },
{ "span-hosts", 'H', OPT_BOOLEAN, "spanhosts", -1 },
{ "spider", 0, OPT_BOOLEAN, "spider", -1 },
- { IF_SSL ("sslcadir"), 0, OPT_VALUE, "sslcadir", -1 },
- { IF_SSL ("sslcafile"), 0, OPT_VALUE, "sslcafile", -1 },
- { IF_SSL ("sslcertfile"), 0, OPT_VALUE, "sslcertfile", -1 },
- { IF_SSL ("sslcertkey"), 0, OPT_VALUE, "sslcertkey", -1 },
- { IF_SSL ("sslcerttype"), 0, OPT_VALUE, "sslcerttype", -1 },
- { IF_SSL ("sslcheckcert"), 0, OPT_VALUE, "sslcheckcert", -1 },
- { IF_SSL ("sslprotocol"), 0, OPT_VALUE, "sslprotocol", -1 },
{ "strict-comments", 0, OPT_BOOLEAN, "strictcomments", -1 },
{ "timeout", 'T', OPT_VALUE, "timeout", -1 },
{ "timestamping", 'N', OPT_BOOLEAN, "timestamping", -1 },
{ "tries", 't', OPT_VALUE, "tries", -1 },
- { "use-proxy", 'Y', OPT_BOOLEAN, "useproxy", -1 },
{ "user-agent", 'U', OPT_VALUE, "useragent", -1 },
{ "verbose", 'v', OPT_BOOLEAN, "verbose", -1 },
{ "verbose", 0, OPT_BOOLEAN, "verbose", -1 },
*p++ = ':';
break;
case OPT_BOOLEAN:
- /* Don't specify optional arguments for boolean short
- options. They are evil because they prevent combining of
- short options. */
+ /* Specify an optional argument for long options, so that
+ --option=off works the same as --no-option, for
+ compatibility with pre-1.10 Wget. However, don't specify
+ optional arguments short-option booleans because they
+ prevent combining of short options. */
longopt->has_arg = optional_argument;
/* For Boolean options, add the "--no-FOO" variant, which is
identical to "--foo", except it has opposite meaning and
-4, --inet4-only connect only to IPv4 addresses.\n"),
N_("\
-6, --inet6-only connect only to IPv6 addresses.\n"),
+ N_("\
+ --prefer-family=FAMILY connect first to addresses of specified family,\n\
+ one of IPv6, IPv4, or none.\n"),
#endif
"\n",
#ifdef HAVE_SSL
N_("\
-HTTPS (SSL) options:\n"),
+HTTPS (SSL/TLS) options:\n"),
+ N_("\
+ --secure-protocol=PR choose SSL protocol, one of auto, SSLv2, SSLv3,\n\
+ and TLSv1.\n"),
+ N_("\
+ --no-check-certificate don't validate the server's certificate.\n"),
N_("\
- --sslcertfile=FILE optional client certificate.\n"),
+ --certificate=FILE client certificate file.\n"),
N_("\
- --sslcertkey=KEYFILE optional keyfile for this certificate.\n"),
+ --certificate-type=TYPE client certificate type, PEM or ASN1.\n"),
N_("\
- --egd-file=FILE file name of the EGD socket.\n"),
+ --private-key=FILE private key file.\n"),
N_("\
- --sslcadir=DIR dir where hash list of CA's are stored.\n"),
+ --private-key-type=TYPE private key type, PEM or ASN1.\n"),
N_("\
- --sslcafile=FILE file with bundle of CA's.\n"),
+ --ca-certificate=FILE file with the bundle of CA's.\n"),
N_("\
- --sslcerttype=0/1 Client-Cert type 0=PEM (default) / 1=ASN1 (DER).\n"),
+ --ca-directory=DIR directory where hash list of CA's is stored.\n"),
N_("\
- --sslcheckcert=0/1 Check the server cert against given CA.\n"),
+ --random-file=FILE file with random data for seeding the SSL PRNG.\n"),
N_("\
- --sslprotocol=0-3 choose SSL protocol; 0=automatic,\n\
- 1=SSLv2 2=SSLv3 3=TLSv1.\n"),
+ --egd-file=FILE file naming the EGD socket with random data.\n"),
"\n",
#endif /* HAVE_SSL */
interoption dependency checks. */
if (opt.reclevel == 0)
- opt.reclevel = INFINITE_RECURSION; /* see wget.h for commentary on this */
+ opt.reclevel = INFINITE_RECURSION; /* see recur.h for commentary on this */
if (opt.page_requisites && !opt.recursive)
{
{
logprintf (LOG_NOTQUIET,
_("\nFINISHED --%s--\nDownloaded: %s bytes in %d files\n"),
- time_str (NULL), legible_large_int (total_downloaded_bytes),
+ time_str (NULL), with_thousand_seps_large (total_downloaded_bytes),
opt.numurls);
/* Print quota warning, if exceeded. */
if (opt.quota && total_downloaded_bytes > opt.quota)
logprintf (LOG_NOTQUIET,
_("Download quota (%s bytes) EXCEEDED!\n"),
- legible (opt.quota));
+ with_thousand_seps_large (opt.quota));
}
- if (opt.cookies_output && wget_cookie_jar)
- cookie_jar_save (wget_cookie_jar, opt.cookies_output);
+ if (opt.cookies_output)
+ save_cookies ();
if (opt.convert_links && !opt.delete_after)
convert_all_links ();