1

When I try to download a file using curl command, the file is downloaded successfully:

curl -O https://domain/file --capath /etc/ssl/certs/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 36.6M  100 36.6M    0     0   826k      0  0:00:45  0:00:45 --:--:-- 4276k

When I try to download the same file using wget, I get the following error:

wget -vS --ca-directory=/etc/ssl/certs/ https://domain/file
--2016-11-23 15:36:50--  https://domain/file
Resolving domain... 
Connecting to domain|194.126.106.153|:443... connected.
ERROR: cannot verify domain's certificate, issued by '......':
  Unable to locally verify the issuer's authority.
To connect to domain insecurely, use `--no-check-certificate'.

I used the same self-signed certificate in both tests.

  • It would probably work if the certificate was signed by a CA (which is then self-signed) which would reside under /etc/ssl/certs. – phk Nov 23 '16 at 13:57
3

Either specify to not check the CA certificate with --no-check-certificate or specify the location of your signing certificate that you signed your self signed cert with using --ca-certificate=<file> or --ca-directory=<directory> to point to a directory containing signing certs in PEM format

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.