I need to connect to a remote server via "https" with mutual authentication.
This is the code:
$zendClient = new Zend_Http_Client('https://<site url>',
array(
'maxredirects' => 0,
'strict' => false,
'timeout' => 30,
'sslcert' => '<certificate name with key + certificate>.pem',
'sslpassphrase' => '<password>',
'adapter' => 'Zend_Http_Client_Adapter_Curl',
'curloptions' => array(CURLOPT_SSL_VERIFYPEER => false)
)
);
$zendClient->setHeaders(array(
<list of custom headers>
)
);
$zendClient->setRawData('<row data>');
$response = $zendClient->request('POST');
It results in this exception:
"Error in cURL request: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3
alert handshake failure"
If I execute "curl" from shell command line, it connects successfully. This
is the command line:
curl --cert <certificate name>.pem --cert-type PEM --data-binary '<post raw
data>' --header '<header value>' --include --insecure --key <private
key>.key --key-type PEM --pass <password> --show-error --verbose --url <site
url>
I use:
PHP 5.2.11
ZF 1.8.4
libcurl 7.19.6
OpenSSL 0.9.8b
Could you help me please?
Thanks in advance
Alberto
--
View this message in context:
http://www.nabble.com/Zend_Http_Client_Adapter_Curl-fails-handshake-in-https-connection-tp25801770p25801770.html
Sent from the Zend Framework mailing list archive at Nabble.com.