I need to send a POST request to the server. The server uses certificates. I have a file with a .p12 extension. This is the first time I come across certificates and do not understand what needs to be done
My code:
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($curl, CURLOPT_CAINFO, ''); // ???
var_dump(curl_exec($curl));
var_dump(curl_error($curl));
curl_close($curl);
As a result, I naturally get the error: bool(false) string(69) "error setting certificate verify locations: CAfile: CApath: none"
But I don't know how to get the path to the certificate from the .p12 file