Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何解决ssl v3警报握手失败?_Php_Ssl_Curl_Command Line_Openssl - Fatal编程技术网

Php 如何解决ssl v3警报握手失败?

Php 如何解决ssl v3警报握手失败?,php,ssl,curl,command-line,openssl,Php,Ssl,Curl,Command Line,Openssl,我试图在我的wamp服务器上本地使用curl 但是,它会失败,并出现以下错误: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure 这是我的密码: $url = sprintf( 'http://thepiratebay.se/search/%s/0/99/%d/', urlencode($keyword ), $category); curl_setopt($ch, CURLOPT

我试图在我的wamp服务器上本地使用curl

但是,它会失败,并出现以下错误:

error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
这是我的密码:

$url = sprintf( 'http://thepiratebay.se/search/%s/0/99/%d/', urlencode($keyword ), $category);

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/cert/cacert.pem");
我尝试添加以下行,如a上建议的:

但它给出了一个新的错误:

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
我的php版本:

5.4.16
我的卷发版本:

7.30.0
OpenSSL/0.9.8y
我的openssl版本:

7.30.0
OpenSSL/0.9.8y
谢谢。

根据说明,本网站仅支持TLS_ECDHE_ECDSA*密码套件

OpenSSL 0.9.8不支持任何ECDHE密码,因此客户端和服务器之间没有通用密码。这会导致SSL握手失败。没有解决方法,但您需要升级OpenSSL。请注意,这可能还包括重新编译curl/PHP,以便它们使用更新版本的OpenSSL。或者您可能会得到更新版本的WAMP,其中可能包含更新版本的OpenSSL。

根据说明,此站点仅支持TLS\u ECDHE\u ECDSA*密码套件


OpenSSL 0.9.8不支持任何ECDHE密码,因此客户端和服务器之间没有通用密码。这会导致SSL握手失败。没有解决方法,但您需要升级OpenSSL。请注意,这可能还包括重新编译curl/PHP,以便它们使用更新版本的OpenSSL。或者您可能会得到更新版本的WAMP,其中可能包含更新版本的OpenSSL。

谢谢您的解释。我有一个安装了OpenSSL版本1.0.1e-fips的unix机箱。我的代码也很有魅力。干杯。谢谢你的善意解释。我有一个安装了OpenSSL版本1.0.1e-fips的unix机箱。我的代码也很有魅力。干杯