From e81a2b85c91a660ed7fc8322fdad8f57016a6e20 Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Mon, 23 Jan 2023 18:56:38 +0100 Subject: [PATCH] Change the fix_quasi_reduction function to static Signed-off-by: Gabor Mezei --- library/bignum_mod_raw_invasive.h | 4 ++++ tests/suites/test_suite_bignum_mod_raw.function | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/library/bignum_mod_raw_invasive.h b/library/bignum_mod_raw_invasive.h index 3d4afedff..7770c0a95 100644 --- a/library/bignum_mod_raw_invasive.h +++ b/library/bignum_mod_raw_invasive.h @@ -28,6 +28,8 @@ #include "mbedtls/bignum.h" #include "bignum_mod.h" +#if defined(MBEDTLS_TEST_HOOKS) + /** Convert an MPI to its canonical representative. * * \note Currently handles the case when `N->int_rep` is @@ -44,4 +46,6 @@ MBEDTLS_STATIC_TESTABLE int mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X, const mbedtls_mpi_mod_modulus *N); +#endif /* MBEDTLS_TEST_HOOKS */ + #endif /* MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H */ diff --git a/tests/suites/test_suite_bignum_mod_raw.function b/tests/suites/test_suite_bignum_mod_raw.function index 2c4a0e66c..d59cddecd 100644 --- a/tests/suites/test_suite_bignum_mod_raw.function +++ b/tests/suites/test_suite_bignum_mod_raw.function @@ -340,7 +340,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE */ +/* BEGIN_CASE depends_on:MBEDTLS_TEST_HOOKS */ void mpi_mod_raw_fix_quasi_reduction(char *input_N, char *input_A, char *result) @@ -381,7 +381,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE */ +/* BEGIN_CASE depends_on:MBEDTLS_TEST_HOOKS */ void mpi_mod_raw_fix_quasi_reduction_neg(char *input_N, char *input_A, char *result)