服务器收到ssl alert 0“关闭通知”作为致命错误

时间:2014-03-27 15:21:26

标签: ssl https openssl

当我们迁移到新服务器时,我们看到了比以前更多的SSL错误。总SSL错误率不高。其中许多是:

error:140943E8:SSL routines:SSL3_READ_BYTES:reason(1000):s3_pkt.c:1256:SSL alert number 0

我们终于发现这些请求实际上是成功的请求。为什么会产生这些错误是 openssl 发现这些是致命的错误。添加更多调试信息显示:

ssl_callback_info:SSL_CB_READ_ALERT fatal error close notify

但是来自rfc2246:

7.2.1. Closure alerts

The client and the server must share knowledge that the connection is
ending in order to avoid a truncation attack. Either party may
initiate the exchange of closing messages.

close_notify
    This message notifies the recipient that the sender will not send
    any more messages on this connection. The session becomes
    unresumable if any connection is terminated without proper
    close_notify messages with level equal to warning.

我们想知道是否有一些特殊客户发送“警报0”为致命。或者这与openssl的一些已知问题有关。我们现在正在使用openssl-1.0.1e。在迁移之前,我们使用了openssl-1.0.0-25。

任何建议都将不胜感激。

更新

我调查了访问日志,发现几乎所有“致命警报0”都是由Safari在Apple设备(Mac,iPhone,iPad)上发送的。

通过libsecurity_ssl代码中的SSL引擎库。我发现这个库会发送“致命警报0”,有时与其他SSL库完全不同,例如openssl,NSS。

SSLFatalSessionAlert(SSL_AlertCloseNotify,ctx);

http://www.opensource.apple.com/source/libsecurity_ssl/libsecurity_ssl-32463/lib/sslRecord.c

这主要发生在Safari遇到意外中断连接时。由于我的服务器不会发送“警告警报0”来关闭连接。

0 个答案:

没有答案