From ad4d2bb3e12b1cc40a0dd0014b656429ba0c7b78 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Wed, 14 Sep 2022 22:40:35 +0800 Subject: [PATCH] Exclude pre_shared_key for HRR Signed-off-by: Jerry Yu --- library/ssl_tls13_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_tls13_server.c b/library/ssl_tls13_server.c index a10e59bbc..e71ba0600 100644 --- a/library/ssl_tls13_server.c +++ b/library/ssl_tls13_server.c @@ -1898,7 +1898,7 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, } #if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED) - if( mbedtls_ssl_tls13_key_exchange_mode_with_psk( ssl ) ) + if( !is_hrr && mbedtls_ssl_tls13_key_exchange_mode_with_psk( ssl ) ) { ret = ssl_tls13_write_server_pre_shared_key_ext( ssl, p, end, &output_len ); if( ret != 0 )