diff --git a/src/internal.c b/src/internal.c index 69faa7c01..2d3d16c7a 100644 --- a/src/internal.c +++ b/src/internal.c @@ -28265,7 +28265,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, #endif } - if (IsEncryptionOn(ssl, 1)) + if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone) sendSz += cipherExtraData(ssl); /* check for available size */ @@ -28326,7 +28326,8 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, ssl->buffers.outputBuffer.length += sendSz; - ret = SendBuffered(ssl); + if (!ssl->options.groupMessages) + ret = SendBuffered(ssl); WOLFSSL_LEAVE("SendTicket", ret); WOLFSSL_END(WC_FUNC_TICKET_SEND);