@@ -693,6 +693,11 @@ find_in_both() {
693
693
fi
694
694
}
695
695
696
+ SKIP_HANDSHAKE_CHECK=" NO"
697
+ skip_handshake_stage_check () {
698
+ SKIP_HANDSHAKE_CHECK=" YES"
699
+ }
700
+
696
701
# Usage: run_test name [-p proxy_cmd] srv_cmd cli_cmd cli_exit [option [...]]
697
702
# Options: -s pattern pattern that must be present in server output
698
703
# -c pattern pattern that must be present in client output
@@ -855,21 +860,25 @@ run_test() {
855
860
# (useful to avoid tests with only negative assertions and non-zero
856
861
# expected client exit to incorrectly succeed in case of catastrophic
857
862
# failure)
858
- if is_polar " $SRV_CMD " ; then
859
- if grep " Performing the SSL/TLS handshake" $SRV_OUT > /dev/null; then : ;
860
- else
861
- fail " server or client failed to reach handshake stage"
862
- return
863
+ if [ " X$SKIP_HANDSHAKE_CHECK " != " XYES" ]
864
+ then
865
+ if is_polar " $SRV_CMD " ; then
866
+ if grep " Performing the SSL/TLS handshake" $SRV_OUT > /dev/null; then : ;
867
+ else
868
+ fail " server or client failed to reach handshake stage"
869
+ return
870
+ fi
863
871
fi
864
- fi
865
- if is_polar " $CLI_CMD " ; then
866
- if grep " Performing the SSL/TLS handshake " $CLI_OUT > /dev/null ; then : ;
867
- else
868
- fail " server or client failed to reach handshake stage "
869
- return
872
+ if is_polar " $CLI_CMD " ; then
873
+ if grep " Performing the SSL/TLS handshake " $CLI_OUT > /dev/null ; then : ;
874
+ else
875
+ fail " server or client failed to reach handshake stage "
876
+ return
877
+ fi
870
878
fi
871
879
fi
872
880
881
+ SKIP_HANDSHAKE_CHECK=" NO"
873
882
# Check server exit code (only for Mbed TLS: GnuTLS and OpenSSL don't
874
883
# exit with status 0 when interrupted by a signal, and we don't really
875
884
# care anyway), in case e.g. the server reports a memory leak.
@@ -8478,6 +8487,17 @@ run_test "export keys functionality" \
8478
8487
-c " EAP-TLS IV is:" \
8479
8488
-s " EAP-TLS IV is:"
8480
8489
8490
+ # TLS1.3 test cases
8491
+ requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
8492
+ requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL
8493
+ skip_handshake_stage_check
8494
+ run_test " TLS1.3: Not supported version check: tls1_2 and tls1_3" \
8495
+ " $P_SRV debug_level=4 min_version=tls1_2 max_version=tls1_3" \
8496
+ " $P_CLI debug_level=4 min_version=tls1_2 max_version=tls1_3" \
8497
+ 1 \
8498
+ -s " SSL - Invalid value in SSL config" \
8499
+ -c " SSL - Invalid value in SSL config"
8500
+
8481
8501
# Test heap memory usage after handshake
8482
8502
requires_config_enabled MBEDTLS_MEMORY_DEBUG
8483
8503
requires_config_enabled MBEDTLS_MEMORY_BUFFER_ALLOC_C
0 commit comments