Leaskovski
Posts: 13
Joined: Tue May 12, 2015 9:29 am

WGET SSL Error

Thu Jan 21, 2016 1:54 pm

Hi Guys,

I recently had to recover my PI from a backed up image, and post restore, I am noticing some issues with using wget with a HTTPS website. I don't know if it is related to the restore or not, so I though I would include that piece of information in case it is.

Anyway, I am running...

Code: Select all

wget -d -U "rinker.sh wget 1.0" --http-user=***** --http-password=***** "https://nic.changeip.com/nic/update?cmd=update"
...as part of a bash script that is cron'd to run every so often to make sure that my dynamic DNS provider is updated. When the above part of the script is run, and when I run it manually, SSL reports back that it failed...

Code: Select all

Setting --user-agent (useragent) to rinker.sh wget 1.0
Setting --http-user (httpuser) to *****
Setting --http-password (httppassword) to *****
DEBUG output created by Wget 1.13.4 on linux-gnueabihf.

URI encoding = `UTF-8'
--2016-01-21 13:43:43--  https://nic.changeip.com/nic/update?cmd=update
Host `nic.changeip.com' has not issued a general basic challenge.
Resolving nic.changeip.com (nic.changeip.com)... 170.178.190.165
Caching nic.changeip.com => 170.178.190.165
Connecting to nic.changeip.com (nic.changeip.com)|170.178.190.165|:443... connected.
Created socket 4.
Releasing 0x0149b7b8 (new refcount 1).
GnuTLS: A TLS warning alert has been received.
Closed fd 4
Unable to establish SSL connection.
Now, I have been doing some digging, and I think the issue is to do with certificates, as if I run OpenSSL to debug the connection...

Code: Select all

openssl s_client -connect nic.changeip.com:443
It gives me the following error...

Code: Select all

verify error:num=19:self signed certificate in certificate chain
So, I thought that if I add the "--no-check-certificate" option to wget, it would solve my issue, but alas, this has no effect.

Any ideas as to what is happening? I have run an apt-get update and installed the ca-certificates package, but this hasn't had any effect either.

Thanks

Return to “Networking and servers”