简体   繁体   English

curl 错误:“sslv3 警报意外消息”

[英]curl error: "sslv3 alert unexpected message"

Curl gives me following error: Curl 给我以下错误:

error:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message

What does this mean?这是什么意思?

It means bad SSL handshake.这意味着 SSL 握手失败。 You will need to specify the version of the protocol like this:您将需要像这样指定协议的版本:

curl_setopt($curl_connection, CURLOPT_SSLVERSION, 3);

Change 3 to 2 if you still get the error.如果仍然出现错误,请将 3 更改为 2。

I got same error when I use macOS default curl which is an old version that only support up to TLSv1.2.我在使用 macOS 默认curl时遇到了同样的错误,这是一个只支持最高 TLSv1.2 的旧版本。 But the endpoint I am trying to call is using TLSv1.3.但我尝试调用的端点使用的是 TLSv1.3。

On macOS, I succeed by installing a new curl version by brew install curl .在 macOS 上,我成功地通过brew install curl安装了一个新的 curl 版本。

Then you can run something, for example然后你可以运行一些东西,例如

/usr/local/opt/curl/bin/curl --version

or要么

/usr/local/opt/curl/bin/curl --tlsv1.3 --request GET \
     --url https://localhost:9200 \
     --cacert ca.crt \
     --key tls.key \
     --cert tls.crt \
     --header 'Content-Type: application/json' \
     --verbose

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Symfony2和PayPal-cURL错误:14077410:SSL(sslv3警报握手失败) - Symfony2 & PayPal - cURL error:14077410:SSL (sslv3 alert handshake failure) php cURL错误:错误:14077410:SSL例程:SSL23_GET_SERVER_HELLO:sslv3警报握手失败 - Php cURL error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure Curl 错误:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure111 - Curl error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure111 CURL和PHP SSLv3错误,并且无法使用TLS - CURL & PHP SSLv3 Error and Can't Get TLS to Work sslv3在wordpress上警告握手失败 - sslv3 alert handshake failure on wordpress PayPal IPN sslv3 警报握手失败 - PayPal IPN sslv3 alert handshake failure sslv3在magento下警报握手失败 - sslv3 alert handshake failure under magento 在PHP中卷曲,SSLV3在bash中起作用,但在libcurl中不起作用 - Curl in PHP, SSLV3 works in bash but not in libcurl 错误:错误:14077410:SSL例程:SSL23_GET_SERVER_HELLO:sslv3警报握手失败 - Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure Paypal无法连接到Sandbox服务器。 返回错误14077410(sslv3警报握手失败) - Paypal can not connect to Sandbox server. Return error 14077410 (sslv3 alert handshake failure)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM