ZF-8033: Zend_Http_Client_Adapter_Curl fails handshake in https connection
Description
I need to connect to a remote server via "https" with mutual authentication. This is the code:
$zendClient = new Zend_Http_Client('https://',
array(
'maxredirects' => 0,
'strict' => false,
'timeout' => 30,
'sslcert' => '.pem',
'sslpassphrase' => '',
'adapter' => 'Zend_Http_Client_Adapter_Curl',
'curloptions' => array(CURLOPT_SSL_VERIFYPEER => false)
)
);
$zendClient->setHeaders(array(
)
);
$zendClient->setRawData('');
$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 .pem --cert-type PEM --data-binary '' --header '
<
header value>' --include --insecure --key .key --key-type PEM --pass --show-error --verbose --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
Comments
Posted by m8r-qoda1a (m8r-qoda1a) on 2012-02-03T10:35:24.000+0000
Try with {{'keepalive' => TRUE}} in your config.
Posted by m8r-qoda1a (m8r-qoda1a) on 2012-02-03T10:37:41.000+0000
-Try with {{'keepalive' => TRUE}} in your config.- (!) Pardon, {{'keepalive' => FALSE}}