mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-14 16:20:51 +00:00
Tweak "waiting for more handshake fragments" log message
In preparation for reworking mbedtls_ssl_prepare_handshake_record(), tweak the "waiting for more handshake fragments" log message in ssl_consume_current_message(), and add a similar one in mbedtls_ssl_prepare_handshake_record(). Assert both. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
2e5a7ea9bc
commit
9bdc8aa80b
@ -3054,6 +3054,9 @@ int mbedtls_ssl_prepare_handshake_record(mbedtls_ssl_context *ssl)
|
||||
ssl->in_hdr = ssl->in_msg + ssl->in_msglen;
|
||||
ssl->in_msglen = 0;
|
||||
mbedtls_ssl_update_in_pointers(ssl);
|
||||
MBEDTLS_SSL_DEBUG_MSG(3, ("Prepare: waiting for more handshake fragments %"
|
||||
MBEDTLS_PRINTF_SIZET "/%" MBEDTLS_PRINTF_SIZET,
|
||||
ssl->in_hsfraglen, ssl->in_hslen));
|
||||
return MBEDTLS_ERR_SSL_CONTINUE_PROCESSING;
|
||||
}
|
||||
if (ssl->in_hsfraglen > 0) {
|
||||
@ -4438,11 +4441,9 @@ static int ssl_consume_current_message(mbedtls_ssl_context *ssl)
|
||||
|
||||
if (ssl->in_hsfraglen != 0) {
|
||||
/* Not all handshake fragments have arrived, do not consume. */
|
||||
MBEDTLS_SSL_DEBUG_MSG(3,
|
||||
("waiting for more fragments (%" MBEDTLS_PRINTF_SIZET " of %"
|
||||
MBEDTLS_PRINTF_SIZET ", %" MBEDTLS_PRINTF_SIZET " left)",
|
||||
ssl->in_hsfraglen, ssl->in_hslen,
|
||||
ssl->in_hslen - ssl->in_hsfraglen));
|
||||
MBEDTLS_SSL_DEBUG_MSG(3, ("Consume: waiting for more handshake fragments %"
|
||||
MBEDTLS_PRINTF_SIZET "/%" MBEDTLS_PRINTF_SIZET,
|
||||
ssl->in_hsfraglen, ssl->in_hslen));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user