From 98680fc2edc25978800a1b6aedbf6bbf7a9f2022 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Tue, 4 Apr 2023 10:22:59 +0200 Subject: [PATCH] ecp: revert changes to ECP module and test suite Signed-off-by: Valerio Setti --- include/mbedtls/ecp.h | 2 -- library/ecp.c | 3 +-- tests/suites/test_suite_ecp.function | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 8bddbae7b8..b6144d9aeb 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -1276,7 +1276,6 @@ int mbedtls_ecp_read_key(mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, int mbedtls_ecp_write_key(mbedtls_ecp_keypair *key, unsigned char *buf, size_t buflen); -#if !defined(MBEDTLS_USE_PSA_CRYPTO) /** * \brief This function checks that the keypair objects * \p pub and \p prv have the same group and the @@ -1300,7 +1299,6 @@ int mbedtls_ecp_write_key(mbedtls_ecp_keypair *key, int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng); -#endif /* MBEDTLS_USE_PSA_CRYPTO */ /** * \brief This function exports generic key-pair parameters. diff --git a/library/ecp.c b/library/ecp.c index a794b3b663..08fbe86c73 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -3316,7 +3316,7 @@ cleanup: return ret; } -#if !defined(MBEDTLS_USE_PSA_CRYPTO) + /* * Check a public-private key pair */ @@ -3357,7 +3357,6 @@ cleanup: return ret; } -#endif /* !MBEDTLS_USE_PSA_CRYPTO */ /* * Export generic key-pair parameters. diff --git a/tests/suites/test_suite_ecp.function b/tests/suites/test_suite_ecp.function index a77260897c..408fe5dfff 100644 --- a/tests/suites/test_suite_ecp.function +++ b/tests/suites/test_suite_ecp.function @@ -955,7 +955,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE depends_on:!MBEDTLS_USE_PSA_CRYPTO */ +/* BEGIN_CASE */ void mbedtls_ecp_check_pub_priv(int id_pub, char *Qx_pub, char *Qy_pub, int id, char *d, char *Qx, char *Qy, int ret)