We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7a8718 commit 6c28ca6Copy full SHA for 6c28ca6
library/ssl_msg.c
@@ -3219,7 +3219,8 @@ static uint32_t ssl_get_hs_total_len(mbedtls_ssl_context const *ssl)
3219
3220
int mbedtls_ssl_prepare_handshake_record(mbedtls_ssl_context *ssl)
3221
{
3222
- if (ssl->in_msglen < mbedtls_ssl_hs_hdr_len(ssl)) {
+ /* First handshake fragment must at least include the header. */
3223
+ if (ssl->in_msglen < mbedtls_ssl_hs_hdr_len(ssl) && ssl->in_hslen == 0) {
3224
MBEDTLS_SSL_DEBUG_MSG(1, ("handshake message too short: %" MBEDTLS_PRINTF_SIZET,
3225
ssl->in_msglen));
3226
return MBEDTLS_ERR_SSL_INVALID_RECORD;
0 commit comments