Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

uniqueginun's avatar

Send Public ssl certificate with cURL

Guys I have API owner sent me a public ssl certificate ".cer" file but I never use it before, now in PHP docs I found this code:

curl_setopt($tuCurl, CURLOPT_SSLCERT, getcwd() . "/client.pem");
curl_setopt($tuCurl, CURLOPT_SSLKEY, getcwd() . "/keyout.pem");
curl_setopt($tuCurl, CURLOPT_CAINFO, getcwd() . "/ca.pem");

but I believe it's for private certificate and mine is public. does anyone knows how to send public certificate with cURL request?

0 likes
0 replies

Please or to participate in this conversation.