https - SSLv3 记录层内的 TLS 握手

标签 https ssl handshake

我的服务器配置为接受 SSLv3 和 TLS1.0 协议(protocol)。但是一些客户端发送的握手参数低于握手参数,并且在服务器问候之后,客户端断开连接并发送“握手失败(40)”警报,不确定是客户端故障还是服务器。

这是初始的客户端问候数据包:

Secure Socket Layer
  SSLv3 Record Layer: Client Hello
  Content Type: Handshake (22)
    Version: SSL 3.0 (0x0300) <-----------------
    Length: 103
    Handshake Protocol: Client Hello
        Handshake Type: Client Hello (1)
        Length: 78
        Version: TLS 1.0 (0x0301) <-------------
        Random
        Session ID Length: 0
        Cipher Suites Length: 18
        Cipher Suites (9 suites)

记录层是 SSL 3.0,但内部握手协议(protocol)是 TLS 1.0。我的问题是,这是正确的做法吗,即为每一层使用不同的版本?如果它是什么方法呢?我在任何地方都找不到它,我查看了 RFC 但找不到任何引用。另外,我怎样才能提出这样的要求?

编辑:我对故障排除和解决问题不感兴趣,我只想知道如何发送此类数据包?任何命令?我应该给这个方法起什么名字? 即我可以使用 curl 或 openssl 来使用 ssl3 或 tls1,但这会在记录层和握手层中发送相同的版本:

curl -v -ssl3 https://www.mywebserver.com

上面的 curl 命令将在 wireshark 上查看:

Wireshark

EDIT2:这合法吗?我一直在谷歌搜索,找不到任何例子。它是否违反任何 rfc 标准?

谢谢

最佳答案

是的,这是合法的(至少在最近的 TLS 规范中得到了澄清)。

您可以在 rfc5246 中查找(TLS 1.2) 或 rfc6101 (SSL 3.0) 或其他关于 SSL/TLS 的 rfc。问题出在记录协议(protocol)和握手协议(protocol)的初始版本上:

rfc5246:

   Earlier versions of the TLS specification were not fully clear on
   what the record layer version number (TLSPlaintext.version) should
   contain when sending ClientHello (i.e., before it is known which
   version of the protocol will be employed).  Thus, TLS servers
   compliant with this specification MUST accept any value {03,XX} as
   the record layer version number for ClientHello.

   TLS clients that wish to negotiate with older servers MAY send any
   value {03,XX} as the record layer version number.  Typical values
   would be {03,00}, the lowest version number supported by the client,
   and the value of ClientHello.client_version.

关于握手协议(protocol),客户端会协商自己实现的最高版本:

client_version: The version of the TLS protocol by which the client wishes to
      communicate during this session.  This SHOULD be the latest
      (highest valued) version supported by the client

关于https - SSLv3 记录层内的 TLS 握手,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9643885/

相关文章:

ios - 将 localhost 添加到 App Transport Security (ATS) NSExceptionDomains 是否安全?

java - 在 2-way SSL 中禁用证书链验证

ssl - 间歇性 SSL 握手错误 nginx

ssl - "SSL23_GET_SERVER_HELLO:reason(1112)"服务器端(Openshift)的解决方法?

java - 添加 SSL 配置后 log4j 无法与 Jetty 一起使用

node.js - 使用 Node.js 将 http 重定向到 https

security - 没有通配符的子域的 SSL

ssl - Corda RAFT TLS V1

Delphi Indy - 如何为 Indy 10 的 SSL-TCP 客户端/服务器链接获取 SSL 证书

ssl - 浏览器本地存储和 SSL