mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
tls13: Use a flag not a counter for CCS and HRR handling
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -1380,7 +1380,7 @@ int mbedtls_ssl_tls13_write_change_cipher_spec(mbedtls_ssl_context *ssl)
|
||||
MBEDTLS_SSL_DEBUG_MSG(2, ("=> write change cipher spec"));
|
||||
|
||||
/* Only one CCS to send. */
|
||||
if (ssl->handshake->ccs_count > 0) {
|
||||
if (ssl->handshake->ccs_sent) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1396,7 +1396,7 @@ int mbedtls_ssl_tls13_write_change_cipher_spec(mbedtls_ssl_context *ssl)
|
||||
/* Dispatch message */
|
||||
MBEDTLS_SSL_PROC_CHK(mbedtls_ssl_write_record(ssl, 0));
|
||||
|
||||
ssl->handshake->ccs_count++;
|
||||
ssl->handshake->ccs_sent = 1;
|
||||
|
||||
cleanup:
|
||||
|
||||
|
Reference in New Issue
Block a user