1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge pull request #6304 from yuhaoth/pr/exclude-pre_shared_key-from-hrr-msg

TLS 1.3: PSK: Exclude pre_shared_key for HRR
This commit is contained in:
Gilles Peskine
2022-09-22 10:21:06 +02:00
committed by GitHub
2 changed files with 31 additions and 1 deletions

View File

@ -2111,7 +2111,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 )