Hello,
I installed let’s encrypt on a server for a domain.
the site works well in https.
This site has a webservice.
when I try to call the webservice from another machine I have the following error:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn’t adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you’d like to turn off curl’s verification of the certificate, use
the -k (or --insecure) option.
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify error:num=20:unable to get local issuer certificate
verify return:0
DONE
CONNECTED(00000003)
You have to use fullchain.pem via SSLCertificateFile and drop SSLCertificateChainFile completely or use chain.pem with SSLCertificateChainFile.
I would recommend the first.
Now the intermediate is missing.
Please paste the contents of /etc/apache2/certs/prod/fullchain.pem.
If you created your certificates with certbot, did you copy the pem-files to that location manually?
Is there a file /etc/apache2/certs/prod/chain.pem?
The documentation of Apache 2.2 is not really clear about whether it accepts both certificates in SSLCertificateFile. Apache 2.4. definitely supports that.
You could try splitting the two certificates and use them separately. Just save fullchain.pem as intermediate.pem, then open intermediate.pem and delete everything from the beginning until the second -----BEGIN CERTIFICATE-----.
Then change your configuration: SSLCertificateFile /etc/apache2/certs/prod/cert.pem SSLCertificateChainFile /etc/apache2/certs/prod/intermediate.pem
The documentation of Apache 2.2 is not really clear about whether it accepts both certificates in SSLCertificateFile. Apache 2.4. definitely supports that.