+2013-09-04 Tim Ruehsen <tim.ruehsen@gmx.de>
+
+ * sample.wgetrc: added "secureprotocol" example
+ * wget.texi (HTTPS (SSL/TLS) Options): Document PFS.
+
2013-08-23 Tim Ruehsen <tim.ruehsen@gmx.de>
* sample.wgetrc: added "httpsonly" example
# Turn on to prevent following non-HTTPS links when in recursive mode
#httpsonly = off
+
+# Tune HTTPS security (auto, SSLv2, SSLv3, TLSv1, PFS)
+#secureprotocol = auto
@cindex SSL protocol, choose
@item --secure-protocol=@var{protocol}
Choose the secure protocol to be used. Legal values are @samp{auto},
-@samp{SSLv2}, @samp{SSLv3}, and @samp{TLSv1}. If @samp{auto} is used,
-the SSL library is given the liberty of choosing the appropriate
+@samp{SSLv2}, @samp{SSLv3}, @samp{TLSv1} and @samp{PFS}. If @samp{auto}
+is used, the SSL library is given the liberty of choosing the appropriate
protocol automatically, which is achieved by sending an SSLv2 greeting
and announcing support for SSLv3 and TLSv1. This is the default.
Specifying @samp{SSLv2}, @samp{SSLv3}, or @samp{TLSv1} forces the use
of the corresponding protocol. This is useful when talking to old and
-buggy SSL server implementations that make it hard for OpenSSL to
-choose the correct protocol version. Fortunately, such servers are
-quite rare.
+buggy SSL server implementations that make it hard for the underlying
+SSL library to choose the correct protocol version. Fortunately, such
+servers are quite rare.
+
+Specifying @samp{PFS} enforces the use of the so-called Perfect Forward
+Security cipher suites. In short, PFS adds security by creating a one-time
+key for each SSL connection. It has a bit more CPU impact on client and server.
+We use known to be secure ciphers (e.g. no MD4) and the TLS protocol.
@item --https-only
When in recursive mode, only HTTPS links are followed.
+2013-09-03 Tim Ruehsen <tim.ruehsen@gmx.de>
+
+ * main.c: Add new value 'PFS' to --secure-protocol to
+ enforce the so-called Perfect Forward Security.
+ * init.c (cmd_spec_secure_protocol): added secure_protocol_pfs
+ * openssl.c, gnutls.c, options.h: likewise
+
2013-08-22 Tim Ruehsen <tim.ruehsen@gmx.de>
* main.c: Add new option --https-only.
case secure_protocol_tlsv1:
err = gnutls_priority_set_direct (session, "NORMAL:-VERS-SSL3.0", NULL);
break;
+ case secure_protocol_pfs:
+#if defined (GNUTLS_VERSION_NUMBER) && GNUTLS_VERSION_NUMBER >= 0x030204
+ err = gnutls_priority_set_direct (session, "PFS", NULL);
+#else
+ err = gnutls_priority_set_direct (session, "NORMAL:-RSA", NULL);
+#endif
+ break;
default:
abort ();
}
{ "sslv2", secure_protocol_sslv2 },
{ "sslv3", secure_protocol_sslv3 },
{ "tlsv1", secure_protocol_tlsv1 },
+ { "pfs", secure_protocol_pfs },
};
int ok = decode_string (val, choices, countof (choices), place);
if (!ok)
HTTPS (SSL/TLS) options:\n"),
N_("\
--secure-protocol=PR choose secure protocol, one of auto, SSLv2,\n\
- SSLv3, and TLSv1.\n"),
+ SSLv3, TLSv1 and PFS.\n"),
N_("\
--https-only only follow secure HTTPS links\n"),
N_("\
case secure_protocol_sslv3:
meth = SSLv3_client_method ();
break;
+ case secure_protocol_pfs:
case secure_protocol_tlsv1:
meth = TLSv1_client_method ();
break;
if (!ssl_ctx)
goto error;
+ /* OpenSSL ciphers: https://www.openssl.org/docs/apps/ciphers.html
+ * Since we want a good protection, we also use HIGH (that excludes MD4 ciphers and some more)
+ */
+ if (opt.secure_protocol == secure_protocol_pfs)
+ SSL_CTX_set_cipher_list (ssl_ctx, "HIGH:MEDIUM:!RC4:!SRP:!PSK:!RSA:!aNULL@STRENGTH");
+
SSL_CTX_set_default_verify_paths (ssl_ctx);
SSL_CTX_load_verify_locations (ssl_ctx, opt.ca_cert, opt.ca_directory);
secure_protocol_auto,
secure_protocol_sslv2,
secure_protocol_sslv3,
- secure_protocol_tlsv1
+ secure_protocol_tlsv1,
+ secure_protocol_pfs
} secure_protocol; /* type of secure protocol to use. */
bool check_cert; /* whether to validate the server's cert */
char *cert_file; /* external client certificate to use. */