我正在尝试连接到需要授权证书的服务,我在我的机器上导入证书,当我通过我的 google chrome 浏览器直接点击服务器时,它给了我完美的结果,但是当我从 php curl 请求中调用这个 URL 时它给了我 sslv3 警报握手失败错误。(错误:14094410:SSL 例程:ssl3_read_bytes:sslv3 警报握手失败)
<?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);