@@ -433,14 +433,12 @@ requires_cipher_enabled() {
433
433
# - $1 = command line (call to a TLS client or server program)
434
434
# - $2 = client/server
435
435
# - $3 = TLS version (TLS12 or TLS13)
436
- # - $4 = Use an external tool without ECDH support
437
- # - $5 = run test options
436
+ # - $4 = run test options
438
437
detect_required_features() {
439
438
CMD_LINE=$1
440
439
ROLE=$2
441
440
TLS_VERSION=$3
442
- EXT_WO_ECDH=$4
443
- TEST_OPTIONS=${5:-}
441
+ TEST_OPTIONS=${4:-}
444
442
445
443
case "$CMD_LINE" in
446
444
*\ force_version=*)
@@ -520,24 +518,9 @@ detect_required_features() {
520
518
else
521
519
# For TLS12 requirements are different between server and client
522
520
if [ "$ROLE" = "server" ]; then
523
- # If the server uses "server5*" certificates, then an ECDSA based
524
- # key exchange is required. However gnutls also does not
525
- # support ECDH, so this limit the choice to ECDHE-ECDSA
526
- if [ "$EXT_WO_ECDH" = "yes" ]; then
527
- requires_any_configs_enabled MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
528
- else
529
- requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_ECDSA_CERT
530
- fi
521
+ requires_any_configs_enabled MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
531
522
elif [ "$ROLE" = "client" ]; then
532
- # On the client side it is enough to have any certificate
533
- # based authentication together with support for ECDSA.
534
- # Of course the GnuTLS limitation mentioned above applies
535
- # also here.
536
- if [ "$EXT_WO_ECDH" = "yes" ]; then
537
- requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_CERT_WO_ECDH
538
- else
539
- requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_CERT
540
- fi
523
+ requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_CERT_WO_ECDH
541
524
requires_pk_alg "ECDSA"
542
525
fi
543
526
fi
@@ -799,10 +782,6 @@ requires_openssl_tls1_3_with_ffdh() {
799
782
# skip next test if openssl cannot handle ephemeral key exchange
800
783
requires_openssl_tls1_3_with_compatible_ephemeral() {
801
784
requires_openssl_next
802
-
803
- if !(is_config_enabled "PSA_WANT_ALG_ECDH"); then
804
- requires_openssl_tls1_3_with_ffdh
805
- fi
806
785
}
807
786
808
787
# skip next test if tls1_3 is not available
@@ -1300,28 +1279,6 @@ is_gnutls() {
1300
1279
esac
1301
1280
}
1302
1281
1303
- # Some external tools (gnutls or openssl) might not have support for static ECDH
1304
- # and this limit the tests that can be run with them. This function checks server
1305
- # and client command lines, given as input, to verify if the current test
1306
- # is using one of these tools.
1307
- use_ext_tool_without_ecdh_support() {
1308
- case "$1" in
1309
- *$GNUTLS_SERV*|\
1310
- *${GNUTLS_NEXT_SERV:-"gnutls-serv-dummy"}*|\
1311
- *${OPENSSL_NEXT:-"openssl-dummy"}*)
1312
- echo "yes"
1313
- return;;
1314
- esac
1315
- case "$2" in
1316
- *$GNUTLS_CLI*|\
1317
- *${GNUTLS_NEXT_CLI:-"gnutls-cli-dummy"}*|\
1318
- *${OPENSSL_NEXT:-"openssl-dummy"}*)
1319
- echo "yes"
1320
- return;;
1321
- esac
1322
- echo "no"
1323
- }
1324
-
1325
1282
# Generate random psk_list argument for ssl_server2
1326
1283
get_srv_psk_list ()
1327
1284
{
@@ -1808,26 +1765,20 @@ run_test() {
1808
1765
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
1809
1766
fi
1810
1767
1811
- # Check if we are trying to use an external tool which does not support ECDH
1812
- EXT_WO_ECDH=$(use_ext_tool_without_ecdh_support "$SRV_CMD" "$CLI_CMD")
1813
1768
1814
1769
# Guess the TLS version which is going to be used.
1815
1770
# Note that this detection is wrong in some cases, which causes unduly
1816
1771
# skipped test cases in builds with TLS 1.3 but not TLS 1.2.
1817
1772
# https://github.com/Mbed-TLS/mbedtls/issues/9560
1818
- if [ "$EXT_WO_ECDH" = "no" ]; then
1819
- TLS_VERSION=$(get_tls_version "$SRV_CMD" "$CLI_CMD")
1820
- else
1821
- TLS_VERSION="TLS12"
1822
- fi
1773
+ TLS_VERSION="TLS12"
1823
1774
1824
1775
# If we're in a PSK-only build and the test can be adapted to PSK, do that.
1825
1776
maybe_adapt_for_psk "$@"
1826
1777
1827
1778
# If the client or server requires certain features that can be detected
1828
1779
# from their command-line arguments, check whether they're enabled.
1829
- detect_required_features "$SRV_CMD" "server" "$TLS_VERSION" "$EXT_WO_ECDH" "$ @"
1830
- detect_required_features "$CLI_CMD" "client" "$TLS_VERSION" "$EXT_WO_ECDH" "$ @"
1780
+ detect_required_features "$SRV_CMD" "server" "$TLS_VERSION" "$@"
1781
+ detect_required_features "$CLI_CMD" "client" "$TLS_VERSION" "$@"
1831
1782
1832
1783
# should we skip?
1833
1784
if [ "X$SKIP_NEXT" = "XYES" ]; then
0 commit comments