How to use rootcert.pem certificate with curl

certificatecurl

I have a file/certificate in next format rootcert.pem. How to use this certificate with curl ?

Best Answer

You could try to use key --cacert or separate this certificate to three different files, put them in one directory and use key --capath.

curl --cacert ~/cert.pem https://yoursite.tld

or

curl --capath ~/certdir/ https://yoursite.tld