regression 4007_x25519: do not fail if X25519 is not supported

When OP-TEE is built with MBedTLS as the core crypto library, X25519 is
not supported. Do not fail "xest regression_4007_x25519" in that case.
Note that a similar check is done in regression_4015 already.

Fixes: 00b3f2cbf4ad ("Add x25519 test cases")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
diff --git a/host/xtest/regression_4000.c b/host/xtest/regression_4000.c
index 716636b..b03c6ab 100644
--- a/host/xtest/regression_4000.c
+++ b/host/xtest/regression_4000.c
@@ -4726,6 +4726,12 @@
 						NULL, &ret_orig)))
 		return;
 
+	if (!ta_crypt_cmd_is_algo_supported(c, &session, TEE_ALG_X25519,
+					    TEE_ECC_CURVE_25519)) {
+		Do_ADBG_Log("X25519 not supported: skip subcase");
+		goto out;
+	}
+
 	Do_ADBG_BeginSubCase(c, "Generate X25519 key");
 
 	if (!ADBG_EXPECT_TRUE(c,
@@ -4735,7 +4741,7 @@
 		return;
 
 	Do_ADBG_EndSubCase(c, "Generate X25519 key");
-
+out:
 	TEEC_CloseSession(&session);
 }
 ADBG_CASE_DEFINE(regression, 4007_x25519, xtest_tee_test_4007_x25519,