为什么不能卷曲/ OpenSSL获取chrome + firefox可以的网站?

时间:2012-08-31 04:17:27

标签: curl https openssl

在我的程序(使用OpenSSL)和curl中,我无法获取网站:

$ curl -v https://registration.experient-inc.com/HTMLProduction/ShowCES131/ConfirmationImages/CES131_Header.JPG
* About to connect() to registration.experient-inc.com port 443 (#0)
*   Trying 12.153.51.94...
* connected
* Connected to registration.experient-inc.com (12.153.51.94) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /usr/ssl/certs/ca-bundle.crt
  CApath: none
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to registration.experient-inc.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to registration.experient-inc.com:443

根据一个不同的问题,我将发布直接openssl调用发生的事情:

$ openssl s_client -host 12.153.51.94 -port 443
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 320 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

知道为什么会发生这种情况/如何解决它?

1 个答案:

答案 0 :(得分:1)

显然,Web服务器根本不支持SSLv2。即它甚至不支持SSLv2你好。强制curl或OpenSSL使用SSLv3 +会导致工作查询。