This seems very difficult to find so please correct me if I've put this in the wrong place.
I have a p12 certificate & can use it with my browser to connect to a WSDL service and get an XML response. I'm trying to connect to that same service using php cURL. Every example I find has me break my p12 down into cert and pem files which doesn't work anyways. Is this necessary? Is there a way to just use the p12? Following the advice from that link I split the p12 up, my code looks like this:
$local_cert = 'file.crt.pem';
$local_key = 'file.key.pem';
$passphrase = "p12_passphrase";
$url='https://url.for.the?wsdl';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_SSLCERT, $local_cert);
curl_setopt($ch, CURLOPT_SSLKEY, $local_key);
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $passphrase);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $passphrase);
$ret = curl_exec($ch);
print_r($ret);
This returns nothing. I don't get it, it works from the browser. Should I be using soapclient instead? What's my next step in figuring out the problem?