0

我可以连接到它抛出我的浏览器,我的意思是我输入主机而不是它要求我输入用户名并传递我输入它并且我在..但是..我无法使用 curl 通过终端连接到它。

$ curl -v https://.../... -3 --basic -u uname:upass -A Mozilla/5.0
* About to connect() to ... (#0)
*   Trying ...
* connected
* Connected to ...
* successfully set certificate verify locations:
*   CAfile: nofile
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ....
* Server certificate:
*    subject: OU=Domain Control Validated; CN=...
*    start date: 201
*    expire date: 201
*    subjectAltName: ... matched
*    issuer: C=U
*    SSL certificate verify ok.
* Server auth using Basic with user 'uname'
> GET /pls/hun/tlh.lt_reg HTTP/1.1
> Authorization: Basic thisoneisgood=
> User-Agent: Mozilla/5.0
> Host: ...
> Accept: */*
> 
* additional stuff not fine transfer.c:1037: 0 0
* SSLv3, TLS alert, Client hello (1):
* Empty reply from server
* Connection #0 to host ... left intact
curl: (52) Empty reply from server
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

问题是什么?

4

2 回答 2

0

尝试通过 验证 cURL 的版本curl -V,7.24.0 有同样的问题,而 7.35.0 工作正常。

于 2014-02-26T04:10:40.673 回答
0

问题出在 curl 上,新版本的 curl 仅适用于 sslv3 服务器在 sslv2 上工作,所以我必须让旧版本的 curl 重新编译它并写 -2 而不是 -3。请注意,如果你用这个 curl 版本写 -2 你会得到同样的错误...... curl 没有写它不支持 sslv2 你必须自己弄清楚。

于 2014-02-27T09:13:45.657 回答