I would like to connect to some API by SSL.
Already I have generated 5 files:
PROD.cert.pem
PROD.issuer.pem
PROD.chain.pem
PROD.csr
PROD.key
This is my php code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $wsdl);
curl_setopt($ch, CURLOPT_SSLCERT, getcwd() . '\PROD.cert.pem');
curl_setopt($ch, CURLOPT_SSLKEY, getcwd() . '\PROD.key');
$output = curl_exec($ch);
var_dump(curl_errno($ch));
var_dump(curl_error($ch));
So, as you can see I add two files: cert and key
When, I run this code I always got error:
SSL certificate problem: unable to get local issuer certificate
Do you know, what I do wrong? How can I resolve this error?
Certificates are not be included in your webdir, you need to install them on your webserver. You can find a comprehensive guide here