【问题标题】:CURL returns "Unknown SSL protocol error"CURL 返回“未知的 SSL 协议错误”
【发布时间】:2014-11-24 05:35:08
【问题描述】:

我在这里查看了几个类似的问题,但没有一个对我有帮助。我想通过 RSA SecurID 密钥卡连接到使用单点登录的 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

有什么想法吗?

【问题讨论】:

    标签: linux web-services ssl curl


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2014-12-16
      • 2017-10-02
      • 1970-01-01
      • 1970-01-01
      • 2015-05-17
      • 2011-03-15
      • 2014-11-29
      • 1970-01-01
      • 2019-01-11
      相关资源
      最近更新 更多