I\'ve a CERT and private key files. I\'m using cUrl and PHP to connect to another service. At the moment, I\'ve cert and key in files and it works perfectly fine with following
Using tmpfile()
might suffice as a workaround.
$tempPemFile = tmpfile();
fwrite($tempPemFile, $pemfile);
$tempPemPath = stream_get_meta_data($tempPemFile);
$tempPemPath = $tempPemPath['uri'];
and then:
curl_setopt($ch, CURLOPT_SSLCERT, $tempPemPath);
but make sure you close it after so the tmp file is delete
fclose($tempPemFile);