gpt4 book ai didi

php - 通过 PHP cURL 连接时出现 SSL3_READ_BYTES 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:52:24 72 4
gpt4 key购买 nike

我的代码生成:

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

$ch = curl_init('https://*************.org/');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
//curl_setopt($ch, CURLOPT_SSLVERSION,3);
//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2);
//curl_setopt($ch, CURLOPT_SSLVERSION, 3);
//curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');
//url_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
//curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'RC4-SHA');
curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1) ;
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

curl_exec($ch);
if(curl_errno($ch))
{
echo 'error :' . curl_error($ch);
};
  • PHP 版本:5.5.6
  • cURL 版本:7.21.0
  • SSL 版本:OpenSSL/0.9.8o

最佳答案

您尝试连接的网站似乎只支持 ECDHE-ECDSA 密码套件:you can check it here .

OpenSSL 0.9.8 似乎不支持椭圆曲线加密:

./openssl098/openssl ciphers
DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:IDEA-CBC-SHA:IDEA-CBC-MD5:RC2-CBC-MD5:RC4-SHA:RC4-MD5:RC4-MD5:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:DES-CBC-MD5:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC2-CBC-MD5:EXP-RC4-MD5:EXP-RC4-MD5

可以通过更新 OpenSSL 来修复。

关于php - 通过 PHP cURL 连接时出现 SSL3_READ_BYTES 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32991859/

72 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com