Re:Don't Copy-Paste from Website to Terminal
by lnguyen on Sunday April 07, 2013 @04:35PM
(#5508646)
Actually it does. You turn off checking via -k
[ Parent
| on HN ]
Re:Don't Copy-Paste from Website to Terminal
by somesay on Sunday April 07, 2013 @04:49PM
(#5508689)
Oh, nice, you are right, should be compiled against OS' key storage. Actually it's wget who often doesn't care of that.
Re:Don't Copy-Paste from Website to Terminal
by LukeShu on Sunday April 07, 2013 @04:57PM
(#5508722)
Um, GNU wget does check the key, and it requires the lengthy `--no-check-certificate` to disable it.
Perhaps busybox wget doesn't check the key? But if you're using busybox, that's a whole other can of worms.
Re:Don't Copy-Paste from Website to Terminal
by 0xbadcafebee on Sunday April 07, 2013 @05:29PM
(#5508856)
Wget does not validate certificates by default because there's no CA bundle provided with wget. It does check for /etc/ssl/cert.pem, but it doesn't provide one. So you have to provide one or set up /etc/ssl/certs/ as OpenSSL libraries expect.
Curl does provide a CA bundle (/usr/share/curl/ca-bundle.crt) and by default libcurl validates certs against it.
Re:Don't Copy-Paste from Website to Terminal
by halfasleep on Monday April 08, 2013 @03:50AM
(#5510459)
cURL doesn't provide a CA bundle any more [1], it's the job of your OS to provide this. As I understand it, all tools that provide SSL support will fail safe if there are no root CAs on your system.
[1] http://curl.haxx.se/docs/sslcerts.html
Re:Don't Copy-Paste from Website to Terminal
by LukeShu on Monday April 08, 2013 @11:46AM
(#5512411)
Though, to be fair:
$ pacman -Qi ca-certificates | grep 'Required By'
Required By : ca-certificates-java curl glib-networking neon qca qt4
Note that curl is on that list but wget isn't.
Re:Don't Copy-Paste from Website to Terminal
by 0xbadcafebee on Monday April 08, 2013 @01:48PM
(#5513247)
Pacman lists ca-certificates as an optional requirement of wget: https://www.archlinux.org/packages/extra/x86_64/wget/
But the point halfasleep is making is important: Don't assume either wget or curl will validate your SSL connection because it may not have been set up by your OS/distribution.
Re:Don't Copy-Paste from Website to Terminal
by somesay on Monday April 08, 2013 @06:51PM
(#5515230)
I wasn't that wrong then. ;)
Re:Don't Copy-Paste from Website to Terminal
by stock_toaster on Tuesday April 09, 2013 @12:36AM
(#5516462)
They do still provide a bundle[1] though, for cases where you need it (eg homebrew's curl-ca-bundle package).
[1]: http://curl.haxx.se/docs/caextract.html
Re:Don't Copy-Paste from Website to Terminal
by lukeschlather on Sunday April 07, 2013 @04:56PM
(#5508719)
Wget has the --no-check-certificate flag, I've had to use it to work with self-signed certs before.