I'm trying to connect to a service that requires a certificate for authorization, I import certificates on my machine and when I directly hit on the server by my google chrome browser it give's me perfect result but when I call this URL from php curl request it gives me sslv3 alert handshake failure error. (error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://example.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_CIPHER_LIST => SSLv3,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_SSLVERSION => 7,
CURLOPT_SSLVERSION => 7,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
var_dump($response);
var_dump($err);