Wget: Unable to connect to https site (TLS error)

I am trying to use wget via Cygwin to get some content from the https site. Unfortunately, when I try to connect, I get the following error:

 #wget https://www.mysite.com/mycontent Connecting to XXXXXXXX... connected. GnuTLS: A TLS fatal alert has been received. Unable to establish SSL connection. 

The certificate is VeriSign Class 3 and has not expired. I tried using the options --no-check-certificate , --secure-protocol=SSLv2 , --secure-protocol=SSLv3 etc., which do not work, but give a slightly different error:

 $ wget --secure-protocol=SSLv3 --no-check-certificate https://www.mysite.com/mycontent Connecting to XXXXXX... connected. GnuTLS: GnuTLS internal error. Unable to establish SSL connection. 

I also tried exporting the DER certificate from Internet Explorer to my computer, and then transferring this certificate to wget, which also failed:

 $ wget --certificate-type=DER --certificate=mysite.cer https://www.mysite.com/mycontent Connecting to XXXXX... connected. GnuTLS: A TLS fatal alert has been received. Unable to establish SSL connection. 

Is there something I am missing? Can someone point me in the direction of what I have to do to make this work?

Sorry, but I had to change the real server information for reasons of employer privacy.

Here is my wget / cygwin configuration information:

 $ wget --version GNU Wget 1.13.4 built on cygwin. +digest +https +ipv6 +iri +large-file +nls -ntlm +opie +ssl/gnutls Wgetrc: /etc/wgetrc (system) Locale: /usr/share/locale Compile: gcc-4 -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" -DLOCALEDIR="/usr/share/locale" -I. -I/usr/src/wget-1.13.4-1/src/wget-1.13.4/src -I../lib -I/usr/src/wget-1.13.4-1/src/wget-1.13.4/lib -g -O2 -pipe Link: gcc-4 -g -O2 -pipe -liconv -lintl /usr/lib/libgnutls.dll.a /usr/lib/libtasn1.dll.a /usr/lib/libz.dll.a /usr/lib/libgcrypt.dll.a /usr/lib/libgpg-error.dll.a /usr/lib/libintl.dll.a -L/usr/lib/ncursesw /usr/lib/libiconv.dll.a -lgcrypt -lgpg-error -lz -lidn ftp-opie.o gnutls.o ../lib/libgnu.a 

Certificate Info

+6
source share
1 answer

I saw this when I try to wget something from an IIS window. There is an IIS error that does not correctly handle SSL requests. Browsers ignore this, wget does not.

If I remember correctly (these were years), there is a wget parameter that tells it to ignore SSL certificate errors ... Perhaps this is the --sslcheckcert parameter. Try using --sslcheckcert=0 .

+1
source

Source: https://habr.com/ru/post/902774/


All Articles