How can I use p12 file/cert to authenticate to REST API using zend http client? I'm not sure how can I send request and attach that kind fo certificate.


To send that kind of cert we just need to set adatper to CURL and set below options:

 $adapter = new ZendClient\Adapter\Curl();
 $adapter->setCurlOption(  CURLOPT_SSLCERTTYPE, 'P12');
 $adapter->setCurlOption(  CURLOPT_SSL_VERIFYHOST, false);
 $adapter->setCurlOption(  CURLOPT_SSL_VERIFYPEER, false);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.