From 4ef8ba29387eaac2893ea22a449e7ad0abbd4668 Mon Sep 17 00:00:00 2001 From: Xiaokang Qian Date: Mon, 6 Feb 2023 11:06:16 +0000 Subject: [PATCH] Assign the ciphersuite in finalize_hrr{server_hello} Signed-off-by: Xiaokang Qian --- library/ssl_tls13_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 46e7284039..65a56b3bcb 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -1976,6 +1976,7 @@ static int ssl_tls13_postprocess_server_hello(mbedtls_ssl_context *ssl) mbedtls_ssl_set_inbound_transform(ssl, handshake->transform_handshake); MBEDTLS_SSL_DEBUG_MSG(1, ("Switch to handshake keys for inbound traffic")); + ssl->session_negotiate->ciphersuite = handshake->ciphersuite_info->id; ssl->session_in = ssl->session_negotiate; cleanup: @@ -2006,6 +2007,7 @@ static int ssl_tls13_postprocess_hrr(mbedtls_ssl_context *ssl) return ret; } + ssl->session_negotiate->ciphersuite = ssl->handshake->ciphersuite_info->id; return 0; }