From 19d4416a453be109604d4be76067615850a203b7 Mon Sep 17 00:00:00 2001 From: Xiaokang Qian Date: Tue, 3 Jan 2023 03:39:50 +0000 Subject: [PATCH] Refine code to remove finalize_write_end_of_early_data() Signed-off-by: Xiaokang Qian --- library/ssl_tls13_client.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 8615d9062..8f5e0fcf6 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -2149,16 +2149,6 @@ cleanup: * Finished. Otherwise, the client MUST NOT send an EndOfEarlyData message. */ -MBEDTLS_CHECK_RETURN_CRITICAL -static int ssl_tls13_finalize_write_end_of_early_data( - mbedtls_ssl_context *ssl) -{ - - mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_CLIENT_CERTIFICATE); - - return 0; -} - MBEDTLS_CHECK_RETURN_CRITICAL static int ssl_tls13_write_end_of_early_data(mbedtls_ssl_context *ssl) { @@ -2180,8 +2170,7 @@ static int ssl_tls13_write_end_of_early_data(mbedtls_ssl_context *ssl) mbedtls_ssl_set_outbound_transform( ssl, ssl->handshake->transform_handshake); - MBEDTLS_SSL_PROC_CHK( - ssl_tls13_finalize_write_end_of_early_data(ssl)); + mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_CLIENT_CERTIFICATE); cleanup: