【问题标题】:Trying to connect to https through terminal尝试通过终端连接到 https
【发布时间】:2013-11-11 08:28:41
【问题描述】:

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

有什么问题?

【问题讨论】:

  • 尝试--anyauth 而不是--basic。您有权访问服务器的访问日志吗?
  • 没有帮助,不,我无权访问日志。我什至尝试设置与浏览器中相同的标题。我得到带有 Live HTTP 标头的标头。

标签: linux curl https terminal


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2018-04-19
      • 2021-01-14
      • 2010-12-02
      • 1970-01-01
      • 2020-08-27
      • 1970-01-01
      • 2014-10-01
      • 1970-01-01
      • 2021-06-05
      相关资源
      最近更新 更多