diff --git a/doc/wget.texi b/doc/wget.texi index 1e1dd367..aef1f80b 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1641,16 +1641,16 @@ without SSL support, none of these options are available. @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}, @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 TLSv1 greeting. -This is the default. +@samp{SSLv2}, @samp{SSLv3}, @samp{TLSv1}, @samp{TLSv1_1}, @samp{TLSv1_2} +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 a TLSv1 greeting. 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 the underlying -SSL library to choose the correct protocol version. Fortunately, such -servers are quite rare. +Specifying @samp{SSLv2}, @samp{SSLv3}, @samp{TLSv1}, @samp{TLSv1_1} or +@samp{TLSv1_2} forces the use of the corresponding protocol. This is +useful when talking to old and 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 diff --git a/src/ChangeLog b/src/ChangeLog index bdc6844a..02094f0a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,10 @@ -2013-10-22 Ángel González +2014-10-08 Nikolay Morozov and Sergey Lvov + + * init.c (cmd_spec_secure_protocol): Add support for + TLS v1.1 and TLS v1.2 protocols + * openssl.c (ssl_init): Add support for OpenSSL engines + +2014-10-22 Ángel González * css-url.c (get_uri_string): Honor the specified length argument. diff --git a/src/init.c b/src/init.c index 93e95f85..09557af7 100644 --- a/src/init.c +++ b/src/init.c @@ -1498,6 +1498,8 @@ cmd_spec_secure_protocol (const char *com, const char *val, void *place) { "sslv2", secure_protocol_sslv2 }, { "sslv3", secure_protocol_sslv3 }, { "tlsv1", secure_protocol_tlsv1 }, + { "tlsv1_1", secure_protocol_tlsv1_1 }, + { "tlsv1_2", secure_protocol_tlsv1_2 }, { "pfs", secure_protocol_pfs }, }; int ok = decode_string (val, choices, countof (choices), place); diff --git a/src/openssl.c b/src/openssl.c index 41459879..e24954ac 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -40,6 +40,9 @@ as that of the covered work. */ #include #include #include +#if OPENSSL_VERSION_NUMBER >= 0x00907000 +#include +#endif #include "utils.h" #include "connect.h" @@ -187,6 +190,12 @@ ssl_init (void) goto error; } +#if OPENSSL_VERSION_NUMBER >= 0x00907000 + OPENSSL_load_builtin_modules(); + ENGINE_load_builtin_engines(); + CONF_modules_load_file(NULL, NULL, + CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE); +#endif SSL_library_init (); SSL_load_error_strings (); SSLeay_add_all_algorithms (); @@ -207,6 +216,14 @@ ssl_init (void) case secure_protocol_tlsv1: meth = TLSv1_client_method (); break; +#if OPENSSL_VERSION_NUMBER >= 0x01001000 + case secure_protocol_tlsv1_1: + meth = TLSv1_1_client_method (); + break; + case secure_protocol_tlsv1_2: + meth = TLSv1_2_client_method (); + break; +#endif default: abort (); } diff --git a/src/options.h b/src/options.h index cd4e5188..3346c91a 100644 --- a/src/options.h +++ b/src/options.h @@ -202,6 +202,8 @@ struct options secure_protocol_sslv2, secure_protocol_sslv3, secure_protocol_tlsv1, + secure_protocol_tlsv1_1, + secure_protocol_tlsv1_2, secure_protocol_pfs } secure_protocol; /* type of secure protocol to use. */ bool check_cert; /* whether to validate the server's cert */