【发布时间】:2014-03-20 04:28:34
【问题描述】:
我有一个远程 Windows 7 服务器,只能通过端口 768 上的 HTTPS 访问。该服务器正在使用来自本地 CentOS 服务器中列出的 CA 的签名证书。
每当我尝试使用以下命令通过 cURL 访问远程服务器时,都会出现如下错误:
[usr@serv certs]# curl -3 -v https://1.1.1.1:768/user/login
* About to connect() to 1.1.1.1 port 768 (#0)
* Trying 1.1.1.1... connected
* Connected to 1.1.1.1 (1.1.1.1) port 768 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -5961
* Closing connection #0
* SSL connect error
curl: (35) SSL connect error
(请注意,出于安全原因,IP 地址已被隐藏)。
我正在运行以下版本的 cURL:
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
值得注意的是,这适用于另外两台运行 Windows XP 而不是 Windows 7 的远程服务器。
我尝试强制 cURL 使用 SSLv3(使用 -3 标志和 -SSLv3 标志)但没有成功。
我刚刚在运行 Raspbian 的 Raspberry Pi 上测试了相同的 CURL 命令,并且能够成功连接。因此,我认为这可能是 CentOS 服务器上使用的 cURL 版本的问题。树莓派正在运行以下版本:
curl 7.26.0 (arm-unknown-linux-gnueabihf) libcurl/7.26.0 OpenSSL/1.0.1e zlib/1.2.7 libidn/1.25 libssh2/1.4.2 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: Debug GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
【问题讨论】:
-
我遇到了同样的问题。我更新了 openssl、curl、lib-curl 和其他东西。无法解决。最后,我认为需要为目标服务器上的此端口制定防火墙策略。在源服务器和目标服务器之间打开端口后问题解决。