So I accidentally stumbled upon this error on my server while debugging.
When I request an API url via wget with wget https://example.com/
, I get the
The certificate of «example.com» is not trusted.
(The URL is, of course, different)
I did a quick search for a solution and found this question on SO.
The ca-certificates
package was already installed. I've ran update-ca-certificates
and got the following:
Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
I also ran c_rehash
, which did add several missing links, but didn't change the outcome.
I checked the server's certificate via https://www.ssllabs.com/ssltest/ and it passes with flying colors (gives an A+ grade, the certificate issuer is listed as COMODO RSA Domain Validation Secure Server CA). Also, requesting the same document via PHP on the same server works fine.
I also tried explicitly setting --ca-directory=/etc/ssl/certs
parameter for wget, but the result is the same.
I have no idea how to troubleshoot this issue further and I'm afraid it might cause issues in the future.
I'm running Debian 7.9 with OpenSSL 1.0.1e 11 Feb 2013.