mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +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:
@ -5888,8 +5888,10 @@ int mbedtls_ssl_read_early_data(mbedtls_ssl_context *ssl,
|
||||
return MBEDTLS_ERR_SSL_CANNOT_READ_EARLY_DATA;
|
||||
}
|
||||
|
||||
if ((ssl->early_data_status != MBEDTLS_SSL_EARLY_DATA_STATUS_UNKNOWN) &&
|
||||
(ssl->early_data_status != MBEDTLS_SSL_EARLY_DATA_STATUS_ACCEPTED)) {
|
||||
if ((ssl->early_data_state.srv !=
|
||||
MBEDTLS_SSL_SRV_EARLY_DATA_STATE_WAITING_CH) &&
|
||||
(ssl->early_data_state.srv !=
|
||||
MBEDTLS_SSL_SRV_EARLY_DATA_STATE_ACCEPTING)) {
|
||||
return MBEDTLS_ERR_SSL_CANNOT_READ_EARLY_DATA;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user