According to the manual, I should be able to specify TLS version 1.2 when using wget.

When I try, it fails.

wget https://site --no-check-certificate --secure-protocol=TLSv1_2
wget: --secure-protocol: Invalid value ‘TLSv1_2’.

If I use wget https://site --no-check-certificate --secure-protocol=TLSv1, it works just fine.

Version information:

wget --version
GNU Wget 1.15 built on linux-gnu.

+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl 

    /etc/wgetrc (system)
    gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" 
    -DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib 
    -I../../lib -D_FORTIFY_SOURCE=2 -I/usr/include -g -O2 
    -fstack-protector --param=ssp-buffer-size=4 -Wformat 
    -Werror=format-security -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall 
    gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
    -Werror=format-security -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall 
    -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib -lssl -lcrypto 
    -ldl -lz -lidn -luuid ftp-opie.o openssl.o http-ntlm.o 

Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.

As written on the project page of wget, the secure protocols TLSv1_1 and TLSv1_2 were added in wget version 1.16.1. Your wget 1.15 does not support it.


  • FWIW, this feature has since been back-ported to wget-1.14 in CentOS7/RHEL7. The range of TLS versions is detected at build time, so it is possible to have only TLS1.0 and not TLS1.2 support, depending on the OpenSSL library version. May 14 '18 at 11:33

You are using wget 1.15.

It seems, you need at least wget 1.16.1 for this, because one of the noteworthy changes in that release was:

  • Add --secure-protocol=TLSv1_1|TLSv1_2 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.