Niko Jojo
Niko Jojo

Reputation: 1236

CURLOPT_CAINFO file extension (.pem or .crt)

What will be the certificate extension for below syntax : path_to_cacert (.pem or .crt)?

curl_setopt($ch, CURLOPT_CAINFO, 'path_to_cacert');

In some blog I have seen .pem and in blog its .crt.

I have EXPORT the certificate from Firefox browser >> page info >> view certificate >> EXPORT.

While exporting certificate, I have choose file type/format like below :

X.509 Certificate (PEM)

Please note : While exporting certificate like above, many blogs mentioning file as .crt, thought its exported as PEM

So, please someone clarify me about these difference.

Upvotes: 2

Views: 1345

Answers (1)

Daniel Stenberg
Daniel Stenberg

Reputation: 58134

libcurl, which does the underlying loading of the file with the help of the TLS library in use, doesn't care at all. You can use whatever extension you like.

Upvotes: 2

Related Questions