diff --git a/src/internal.c b/src/internal.c index 72b9dd2f1..e9bf1037d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -17895,6 +17895,16 @@ startScr: goto startScr; } #endif + #ifdef WOLFSSL_TLS13 + if (IsAtLeastTLSv1_3(ssl->version) && ssl->options.handShakeDone && + ssl->curRL.type == handshake && peek) { + WOLFSSL_MSG("Got Handshake Messge in APP data"); + if (ssl->buffers.inputBuffer.length == 0) { + ssl->error = WOLFSSL_ERROR_WANT_READ; + return 0; + } + } + #endif } if (sz < (int)ssl->buffers.clearOutputBuffer.length)