2013-10-31 123 views
0

我可以连接到它扔我的浏览器,我的意思是我键入主机比它要求我的用户名和通过我输入它,我在..但.. ..我不能连接到它通过终端使用卷曲。试图通过终端连接到https

$ 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): 

是什么问题?

+0

尝试'--anyauth'而不是'--basic'。你有权访问服务器的访问日志吗? – keltar

+0

没有帮助,我没有访问日志。我甚至试图设置与浏览器中相同的标题。我使用Live HTTP标头获取标题。 – user2940285

回答

0

问题在于curl,curl的新版本只能在sslv3服务器上运行在sslv2上,所以我不得不使用旧版本的curl重新编译它,而是编写-2而不是-3。注意,如果你用这个curl版本编写-2,你会得到同样的错误... curl不会写道它不支持sslv2,你必须自己弄清楚它。

0

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