相关疑难解决方法(0)

curl:(35)错误:1408F10B:SSL例程:ssl3_get_record:版本号错误

当我尝试使用curl(或libcurl)连接到任何服务器(例如google.com)时,我收到错误消息:

curl:(35)错误:1408F10B:SSL例程:ssl3_get_record:版本号错误

详细输出:

$ curl www.google.com --verbose  
* Rebuilt URL to: www.google.com/  
* Uses proxy env variable no_proxy == 'localhost,127.0.0.1,localaddress,.localdomain.com'  
* Uses proxy env variable http_proxy == 'https://proxy.in.tum.de:8080'  
*   Trying 131.159.0.2...  
* TCP_NODELAY set  
* Connected to proxy.in.tum.de (131.159.0.2) port 8080 (#0)  
* successfully set certificate verify locations:  
*   CAfile: /etc/ssl/certs/ca-certificates.crt  
  CApath: none  
* TLSv1.3 (OUT), TLS handshake, Client hello (1):  
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number  
* Closing connection 0  
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number'  
Run Code Online (Sandbox Code Playgroud)

由于某种原因curl似乎使用TLSv1.3,即使我强制它使用TLSv1.2命令--tlsv1.2(它仍将打印TLSv1.3(OUT),..."我使用的是最新版本Curl和OpenSSL:

$ curl -V …
Run Code Online (Sandbox Code Playgroud)

ssl curl

48
推荐指数
4
解决办法
8万
查看次数

卷曲返回"未知协议"

尽管Google上有很多结果,但似乎没有人给出答案.我有一个Debian框,我这样做:

# curl https://localhost/api/v1/status --verbose
* About to connect() to localhost port 443 (#0)
*   Trying ::1...
* connected
* Connected to localhost (::1) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection #0
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Run Code Online (Sandbox Code Playgroud)

我无法通过未知协议的事情.我试过-ssl -sslv3,但他们让我无处可去.实际上,-sslv3让我略有不同的结果:

s# curl https://localhost/api/v1/status --verbose -sslv3
* About to connect() to localhost port 443 (#0)
*   Trying ::1...
* connected
* …
Run Code Online (Sandbox Code Playgroud)

apache ssl curl

16
推荐指数
3
解决办法
6万
查看次数

标签 统计

curl ×2

ssl ×2

apache ×1