mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
tls13: client: Add comment about early data in 2nd ClientHello
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -1180,6 +1180,14 @@ int mbedtls_ssl_tls13_write_client_hello_exts(mbedtls_ssl_context *ssl,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||||
|
/* In the first ClientHello, write the early data indication extension if
|
||||||
|
* necessary and update the early data status.
|
||||||
|
* If an HRR has been received and thus we are currently writing the
|
||||||
|
* second ClientHello, the second ClientHello must not contain an early
|
||||||
|
* data extension and the early data status must stay as it is:
|
||||||
|
* MBEDTLS_SSL_EARLY_DATA_STATUS_NOT_SENT or
|
||||||
|
* MBEDTLS_SSL_EARLY_DATA_STATUS_REJECTED.
|
||||||
|
*/
|
||||||
if (!ssl->handshake->hello_retry_request_flag) {
|
if (!ssl->handshake->hello_retry_request_flag) {
|
||||||
if (mbedtls_ssl_conf_tls13_is_some_psk_enabled(ssl) &&
|
if (mbedtls_ssl_conf_tls13_is_some_psk_enabled(ssl) &&
|
||||||
ssl_tls13_early_data_has_valid_ticket(ssl) &&
|
ssl_tls13_early_data_has_valid_ticket(ssl) &&
|
||||||
|
Reference in New Issue
Block a user