GnuTLS问题与HTTPS

时间:2018-05-12 04:43:00

标签: https openssl gnutls

我已经安装了debian Whizzy和Jessie成功但是当我尝试通过https做一些请求时,我得到了奇怪的错误

$ wget https://google.com
--2018-05-12 11:06:27--  https://google.com/
Resolving google.com (google.com)... 216.58.196.46
Connecting to google.com (google.com)|216.58.196.46|:443... connected.
GnuTLS: A TLS packet with unexpected length was received.
Unable to establish SSL connection.

与cURL相同,甚至是gnutls-cli

$ curl https://google.com
curl: (35) Unknown SSL protocol error in connection to google.com:443

$ gnutls-cli -p 443 google.com
Processed 166 CA certificate(s).
Resolving 'google.com'...
Connecting to '216.58.196.46:443'...
*** Fatal error: Error in the pull function.
No certificates found!
*** Handshake has failed
GnuTLS error: Error in the pull function.

然而,其他一些https效果很好

$ wget https://stackoverflow.com
--2018-05-12 11:09:10--  https://stackoverflow.com/
Resolving stackoverflow.com (stackoverflow.com)... 151.101.1.69, 151.101.65.69,          151.101.129.69, ...
Connecting to stackoverflow.com (stackoverflow.com)|151.101.1.69|:443... connect         ed.
HTTP request sent, awaiting response... 200 OK
Length: 252141 (246K) [text/html]
Saving to: `index.html.3'

100%[======================================>] 252,141      294K/s   in 0.8s

2018-05-12 11:09:17 (294 KB/s) - `index.html.3' saved [252141/252141]

我试过openssl,它显示这样的错误,即使是tls1,tls1.2

$ openssl s_client -connect google.com:443
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 290 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1526113843
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

那么,有什么想让https工作吗?

我尝试了 gnutls26 gnutls28 ,但同样的问题。

0 个答案:

没有答案