I read all the questions / answers I could find, but no one solved my problem.
here connecting to the same URL using cURL and certificate ($ pem = absolute path to the .pem file) this works
$ch = curl_init($wsdl);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSLCERT, $pem);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$response = curl_exec($ch);
The end here is the code that I tried to connect to wsdl via SOAP
$client = new SoapClient($wsdl, array('local_cert' => $pem));
Even tried loading the contents of the certificate into 'local_cert'
$client = new SoapClient($wsdl, array('local_cert' => file_get_contents($pem)));
In both lines of soap code, I get an error message from the server, saying that I was not authorized ...
Do I need to activate something before sending the certificate?
source
share