Skip to content

Commit

Permalink
Issue #6072 - minimum fix for jetty-9.3.x
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Sep 8, 2021
1 parent 309897e commit bcea10a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
Expand Up @@ -741,6 +741,18 @@ else if (_decryptedInput == null)
throw new IllegalStateException("Unexpected unwrap result " + unwrapResultStatus);

case BUFFER_UNDERFLOW:
// Continue if we can compact?
if (BufferUtil.compact(_encryptedInput))
continue;

// Are we out of space?
if (BufferUtil.space(_encryptedInput) == 0)
{
BufferUtil.clear(_encryptedInput);
throw new SSLHandshakeException("Encrypted buffer max length exceeded");
}

_underFlown = true;
case OK:
{
if (unwrapHandshakeStatus == HandshakeStatus.FINISHED)
Expand Down

0 comments on commit bcea10a

Please sign in to comment.