Only enable fix_quasi_reduction when testing
Avoid compiler error due to the fix_quasi_reduction function
is static and has not been used.
@@ -118,15 +118,7 @@ void mbedtls_mpi_mod_raw_sub(mbedtls_mpi_uint *X,
(void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c);
}
-void mbedtls_mpi_mod_raw_mul(mbedtls_mpi_uint *X,
- const mbedtls_mpi_uint *A,
- const mbedtls_mpi_uint *B,
- const mbedtls_mpi_mod_modulus *N,
- mbedtls_mpi_uint *T)
-{
- mbedtls_mpi_core_montmul(X, A, B, N->limbs, N->p, N->limbs,
- N->rep.mont.mm, T);
-}
+#if defined(MBEDTLS_TEST_HOOKS)
MBEDTLS_STATIC_TESTABLE
void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X,
@@ -137,6 +129,18 @@ void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X,
(void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c);
}
+#endif /* MBEDTLS_TEST_HOOKS */
+
+void mbedtls_mpi_mod_raw_mul(mbedtls_mpi_uint *X,
+ const mbedtls_mpi_uint *A,
+ const mbedtls_mpi_uint *B,
+ const mbedtls_mpi_mod_modulus *N,
+ mbedtls_mpi_uint *T)
+{
+ mbedtls_mpi_core_montmul(X, A, B, N->limbs, N->p, N->limbs,
+ N->rep.mont.mm, T);
+}
+
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
