尝试通过终端连接到https

时间:2013-10-31 11:02:20

标签: linux curl https terminal

我可以连接到它抛出我的浏览器,我的意思是我输入主机而不是它要求我输入用户名并通过我输入它我在...但是..我无法通过终端使用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):

有什么问题?

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

问题在于curl,新版本的curl仅适用于sslv3服务器正在使用sslv2,所以我不得不使用旧版本的curl重新编译它并写入-2而不是-3。请注意,如果您使用此curl版本编写-2,则会出现相同的错误... curl不写道它不支持sslv2,您必须自己弄明白。