From ed25edb1a2fbdd7b38c306bb1e25ca199983f692 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Thu, 18 May 2023 19:04:36 +0200 Subject: [PATCH] test_suite_pkparse: fix failure When the key is imported into an ecp_keypair structure it is read by means of mbedtls_mpi_read_binary_le() and then checked with mbedtls_ecp_check_privkey() which returns error (as expected). When the key is imported in PSA then it is read using mbedtls_ecp_read_key() which fixes the errors in the test before importing. This cause the test itself to fail. As a consequence I set the dependency to ECP_C because it's the only case in which the key is imported in an ecp_keypair structure. Signed-off-by: Valerio Setti --- tests/suites/test_suite_pkparse.data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_pkparse.data b/tests/suites/test_suite_pkparse.data index 02a6ae750..978439ac3 100644 --- a/tests/suites/test_suite_pkparse.data +++ b/tests/suites/test_suite_pkparse.data @@ -1197,7 +1197,7 @@ depends_on:MBEDTLS_ECP_LIGHT pk_parse_key:"30070201010400a000":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT Key ASN1 (OneAsymmetricKey X25519, doesn't match masking requirements, from RFC8410 Appendix A but made into version 0) -depends_on:MBEDTLS_ECP_LIGHT +depends_on:MBEDTLS_ECP_C pk_parse_key:"302e020100300506032b656e04220420f8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3f":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT Key ASN1 (OneAsymmetricKey X25519, with invalid optional AlgorithIdentifier parameters)