0

Using RHEL/AL2, curl works when I use the --cacert param, but fails without

When I try to connect to a server I get an error curl: (60) SSL certificate problem: unable to get local issuer certificate.

However when I provide the cert itself from /etc/ssl/certs via --cacert the problem goes away.

I'm not too familiar with certificates but I'd imagine how curl pulls the cert for a specific server is somehow not right.

Any ideas?

U880D
  • 1,169
Ben Arnao
  • 101

1 Answers1

0

In order to be able to use Self-Signed Certificates and to let OS tools validate chain

  • Place the certificate under /etc/pki/ca-trust/source/anchors/
  • Update the trust via /bin/update-ca-trust extract
  • Additionally, if Java is installed on the system, place a symlink to /etc/pki/ca-trust/extracted/java/cacerts

Further Readings

U880D
  • 1,169