1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-07 06:42:56 +03:00

tls13: Introduce early_data_state SSL context field

Introduce early_data_state SSL context field to
distinguish better this internal state from
the status values defined for the
mbedtls_ssl_get_early_data_status() API.
Distinguish also between the client and
server states. Note that the client state
are going to be documented and reworked
as part of the implementation of
mbedtls_ssl_write_early_data().

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2024-01-30 16:13:34 +01:00
parent 7d21cded3f
commit 0883b8b625
7 changed files with 74 additions and 66 deletions

View File

@@ -1099,13 +1099,7 @@ static int ssl_handshake_init(mbedtls_ssl_context *ssl)
}
#if defined(MBEDTLS_SSL_EARLY_DATA)
#if defined(MBEDTLS_SSL_SRV_C)
MBEDTLS_STATIC_ASSERT(MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN == 0,
"MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN not equal to 0");
#endif
MBEDTLS_STATIC_ASSERT(MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT == 0,
"MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT not equal to 0");
ssl->early_data_status = 0;
ssl->early_data_state.cli = 0;
#endif
/* Initialize structures */