limit session ticket number when resumption
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
f3bdf9dd51
commit
359e65f784
1 changed files with 8 additions and 1 deletions
|
@ -2866,7 +2866,14 @@ static int ssl_tls13_write_new_session_ticket( mbedtls_ssl_context *ssl )
|
|||
MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_finish_handshake_msg(
|
||||
ssl, buf_len, msg_len ) );
|
||||
|
||||
ssl->handshake->new_session_tickets_count--;
|
||||
/* Limit session tickets count to one when resumption connection.
|
||||
*
|
||||
* See document of mbedtls_ssl_conf_new_session_tickets.
|
||||
*/
|
||||
if( ssl->handshake->resume == 1 )
|
||||
ssl->handshake->new_session_tickets_count = 0;
|
||||
else
|
||||
ssl->handshake->new_session_tickets_count--;
|
||||
|
||||
mbedtls_ssl_handshake_set_state( ssl,
|
||||
MBEDTLS_SSL_NEW_SESSION_TICKET_FLUSH );
|
||||
|
|
Loading…
Reference in a new issue