diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 3b719ee15794..d25ef972faa7 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -1391,10 +1391,9 @@ static int ssl_tls13_process_server_hello( mbedtls_ssl_context *ssl ) * - Make sure it's either a ServerHello or a HRR. * - Switch processing routine in case of HRR */ - ssl->major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; - ssl->handshake->extensions_present = MBEDTLS_SSL_EXT_NONE; + ssl->handshake->extensions_present = MBEDTLS_SSL_EXT_NONE; ret = ssl_server_hello_coordinate( ssl, &buf, &buf_len ); /* Parsing step @@ -1450,6 +1449,7 @@ int mbedtls_ssl_tls13_handshake_client_step( mbedtls_ssl_context *ssl ) case MBEDTLS_SSL_ENCRYPTED_EXTENSIONS: // Stop here : we haven't finished whole flow + MBEDTLS_SSL_DEBUG_MSG( 2, ( "MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" ) ); ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; break; diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index e57776358c5d..a2fd97d47a32 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -8668,11 +8668,11 @@ run_test "TLS1.3: handshake dispatch test: tls1_3 only" \ requires_openssl_tls1_3 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL -run_test "TLS1.3: Test client hello msg work" \ +run_test "TLS1.3: Test handshake msg work " \ "$O_NEXT_SRV -tls1_3 -msg" \ "$P_CLI min_version=tls1_3 max_version=tls1_3" \ 1 \ - -c "SSL - The requested feature is not available" \ + -c "MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" \ -s "ServerHello" # Test heap memory usage after handshake