gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 12:37:08 26 4
gpt4 key购买 nike

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

curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

详细输出:

$ 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'

出于某种原因,curl 似乎使用了 TLSv1.3,即使我通过命令 --tlsv1.2 强制它使用 TLSv1.2(它仍然会打印 TLSv1.3 (OUT),..."我正在使用最新版本的 Curl 和 OpenSSL:

$ curl -V  
curl 7.61.0-DEV (x86_64-pc-linux-gnu) libcurl/7.61.0-DEV OpenSSL/1.1.1 zlib/1.2.8
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

我认为这是与我安装程序有关的问题。有人可以向我解释此错误消息的含义吗?

最佳答案

* Uses proxy env variable http_proxy == 'https://proxy.in.tum.de:8080'   
^^^^^

https://错了,应该是http://。代理本身应该通过 HTTP 而不是 HTTPS 访问,即使目标 URL 是 HTTPS。尽管如此,代理仍会正确处理 HTTPS 连接并保持端到端加密。参见 HTTP CONNECT method有关如何完成此操作的详细信息。

关于ssl - curl :(35)错误:1408F10B:SSL例程:ssl3_get_record:错误的版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50840101/

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