linux - CURL 返回 "Unknown SSL protocol error"

标签 linux web-services ssl curl

我在这里看过几个类似的问题,但没有一个对我有帮助。我想连接到通过 RSA SecurID keyfob 使用单点登录的 Web 服务。我首先尝试加载初始 GET 请求提供的任何 cookie。这是我的命令:

curl -A "Mozilla/5.0" -L -b cookies.txt -c cookies.txt -v -X GET \
  https://sso.example.com/sso/login.htm

我得到这样的回应:

* About to connect() to sso.example.com port 443 (#0)
*   Trying 23.12.245.199... connected
* Connected to sso.example.com (23.12.245.199) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs/
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to sso.example.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to sso.example.com:443

这是我正在使用的:

# curl --version
curl 7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
#  more /etc/*-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
# uname -r
3.0.101-0.21-default

有什么想法吗?

最佳答案

这是您客户端中的 OpenSSL,无法理解服务器正在说什么,因此出错。

有时您可以通过强制 curl 使用 SSLv3 ( -3 )、TLS1.0 ( -1 ) 甚至 SSLv2 ( -2 ) 来解决这些问题

...也可以想象,您的 curl 和 OpenSSL 的严重过时版本只是有一个或两个错误导致了这个问题,您可以通过升级到现代版本来解决这个问题(然后还可以解决您的众多安全问题版本包含)。

关于linux - CURL 返回 "Unknown SSL protocol error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26106451/

相关文章:

javascript - Rails 服务器/控制台错误 - 没有要加载的文件 - CoffeeScript (LoadError)

linux - 删除文件中元素由模式定义的部分行

c - 如何编写 sigtstp 处理程序以在 ctrl+z 之后返回到我自己实现的 shell 中的主循环?

web-services - 如何使用 Azure API 管理链接 API

amazon-web-services - 创建 CA 证书时 AWS 中的 ValidationException

ruby-on-rails - Rails 5,Heroku with Let's Encrypt SSL - 配置设置时遇到问题

java - 打开文件太多错误,但 lsof 显示打开文件的合法数量

java - 错误后的动态结果(列表或对象)

c# - WCF 客户端/Java Web 服务 - 反序列化对象为空

ssl - Prestashop 上的混合内容图像