Skip to content

Commit

Permalink
Modify client handshake case
Browse files Browse the repository at this point in the history
To match current status

Signed-off-by: Jerry Yu <[email protected]>
  • Loading branch information
yuhaoth committed Sep 10, 2021
1 parent 2914caa commit 8770a7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/ssl_tls13_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions tests/ssl-opt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8770a7b

Please sign in to comment.