Fix an infinite loop in SslHandler due to mysterious BUFFER_OVERFLOW state

- Fixes #1134
This commit is contained in:
Trustin Lee 2013-03-14 18:12:12 +09:00
parent 067a0a8a78
commit def55f5358

View File

@ -1219,6 +1219,9 @@ public class SslHandler extends FrameDecoder
if (result.getStatus() == Status.CLOSED) {
sslEngineCloseFuture.setClosed();
}
if (result.getStatus() == Status.BUFFER_OVERFLOW) {
throw new SSLException("SSLEngine.unwrap() reported an impossible buffer overflow.");
}
final HandshakeStatus handshakeStatus = result.getHandshakeStatus();
handleRenegotiation(handshakeStatus);