'curl SSL certificate issue - Go Daddy secure certificate authority - g2

I need to connect to a 3rd party API signed by Go Daddy secure certificate authority - G2. (I verified that in the Chrome browser).

When I try to issue a curl request to that API over port 8443 (which is opened) I receive the following error:

SSL certificate problem: unable to get local issuer certificate Closing connection 0 curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html

I checked and in the default curl cacert store there is Go Daddy secure certificate authority - G2 listed. I also downloaded the latest cacert store from https://curl.se/docs/caextract.html and used that by supplying --cacert option to curl command and again I received the same error.

By using -v option with curl command in output I receive which cacert store is used so with that I am sure it is using the one I explicitly added to the command.

Since the certificate exists in cacert store that I am telling curl to use, what else am I missing here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source