【问题标题】:Netty SslHandler sends no close_notifyNetty SslHandler 不发送 close_notify
【发布时间】:2018-02-14 15:30:17
【问题描述】:

我们的带有 SSLHandler 的网络服务器不响应来自 peer 的 close_notify 和 FIN。要求是 netty SslHandler 应该按照这里的 RFC 发送 close_notify。我们正在使用带有 Opensslengine 的 Netty-4.1.17。

7.2.1.  Closure Alerts [[https://tools.ietf.org/html/rfc5246#section-7.2.1]]
   The client and the server must share knowledge that the connection is 
   ending in order to avoid a truncation attack. 
   [...] 
   Unless some other fatal alert has been transmitted, each party is 
   required to send a close_notify alert before closing the write side 
   of the connection.  The other party MUST respond with a close_notify 
   alert of its own and close down the connection immediately, 
   discarding any pending writes.

【问题讨论】:

    标签: netty


    【解决方案1】:

    我认为这在后来的 netty 版本中得到了修复。请升级到最新版本

    【讨论】:

    • 我使用标准 JDK 1.8.u121 SSLEngine 测试了版本 4.1.21 Final,我可以看到我的客户端 (jmeter) 在所有 1000 个请求中都在发送 close_notify 警报,但 Netty-Server 没有响应 close_notify。
    • 参见 wireshark capture 使用以下 wireshark 过滤器 tcp.port eq 8443 和 ssl.record.length > 2 和 ssl.record.content_type == 21 。然后跟随 SSL 流。我认为 Netty 正在吞噬 SSLEngine 发送的 close_notify 警报。
    猜你喜欢
    • 2012-06-22
    • 1970-01-01
    • 2019-01-13
    • 2020-07-13
    • 1970-01-01
    • 2014-09-15
    • 1970-01-01
    • 2016-01-25
    • 2015-11-03
    相关资源
    最近更新 更多