I have a HTTPS-site that needs an intermediate-certificate to verify the servers SSL-certificate.
If I put the intermediate-cert into /etc/ssl/certs (and make the hash-link) then
openssl s_client -connect IP:PORT
will work. Otherwise I get a verification error.
Where does wget look for certificates? I only can make it work if I explicitly set --ca-directory in wget.
So it seems openssl looks into /etc/ssl/certs and wget does not.
Thanks!
EDIT
If I run wget with -d then I see without --ca-directory it loads about 150 certificates. With the option it is over 300. So it must be another path then openssl-default I think.
Wget 1.19.4 on linux-gnu on Debian 10
According to the manpage of
wget
:Where's that? Turns out, that's complicated. It depends on your system, etc.
Simple ways to find out what
wget
actually does arereading its output:
using
strace
:strace wget https://your-url
In the output, you can read which files
wget
opened, tried to open, etc.Since
strace
produces quite a lot of output, you may want to limit it to certain syscalls. It looks like wget usesopenat
to read files, so:contains the interesing lines:
And there are even more locations it looks at, they might even be different for your system.