ssl-opt: don't assume TLS 1.3 usage for external tool that don't have support
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 6113eeb..b214c65 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -1628,13 +1628,18 @@
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
fi
- # If the client or server requires certain features that can be detected
- # from their command-line arguments, check that they're enabled.
- TLS_VERSION=$(get_tls_version "$SRV_CMD" "$CLI_CMD")
-
# Check if we are trying to use an external tool wich does not support ECDH
EXT_WO_ECDH=$(use_ext_tool_without_ecdh_support "$SRV_CMD" "$CLI_CMD")
+ # Guess the TLS version which is going to be used
+ if [ "$EXT_WO_ECDH" = "no" ]; then
+ TLS_VERSION=$(get_tls_version "$SRV_CMD" "$CLI_CMD")
+ else
+ TLS_VERSION="TLS12"
+ fi
+
+ # If the client or server requires certain features that can be detected
+ # from their command-line arguments, check that they're enabled.
detect_required_features "$SRV_CMD" "server" "$TLS_VERSION" "$EXT_WO_ECDH" "$@"
detect_required_features "$CLI_CMD" "client" "$TLS_VERSION" "$EXT_WO_ECDH" "$@"