SSL 握手显示密码 0000

SSL handshake shows cipher 0000

我的 SSL 握手(使用 openssl s_client -connect host:port)显示此输出:

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: 1631731107
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

它显​​示 return 代码 0(正常)、开始时间等。这是否意味着此处已建立 SSL 会话?为什么它不显示我通常在其他 SSL 会话中看到的其他内容,例如密码、会话 ID 等?

来自https://www.virtuesecurity.com/kb/null-ciphers-supported/

Cipher Name (IANA)      Cipher Name (OpenSSL)   Value
TLS_NULL_WITH_NULL_NULL N/A                     0x00,0x00

另见 https://en.wikipedia.org/wiki/Null_cipher

只是不要使用它,没有加密。

这个输出意味着握手根本没有成功。在此之前的输出中通常会有错误,如下所示:

$ openssl s_client -connect example.com:80
CONNECTED(00000003)
140501726137216:error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number:ssl_pkt.c:386:
....
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    ...
    Verify return code: 0 (ok)

在这个例子中,尝试了一个 TLS 连接到一个根本不使用 TLS 而只使用普通 HTTP 的服务器(因为我已经连接到普通 HTTP 端口)。有一个明显的错误显示某种 TLS 问题,在本例中是由于尝试将纯 HTTP 响应解释为 TLS 而引起的。