diff --git a/tests/suites/test_suite_bignum_mod.function b/tests/suites/test_suite_bignum_mod.function index 527146e30..8ab8ccf32 100644 --- a/tests/suites/test_suite_bignum_mod.function +++ b/tests/suites/test_suite_bignum_mod.function @@ -207,6 +207,9 @@ void mpi_mod_mul_neg( char * input_A, mbedtls_mpi_mod_modulus m; mbedtls_mpi_mod_modulus_init( &m ); + mbedtls_mpi_mod_modulus fake_m; + mbedtls_mpi_mod_modulus_init( &fake_m ); + TEST_EQUAL( test_read_modulus( &m, MBEDTLS_MPI_MOD_REP_MONTGOMERY, input_N ), 0 ); @@ -223,9 +226,6 @@ void mpi_mod_mul_neg( char * input_A, TEST_EQUAL( mbedtls_mpi_mod_mul( &rX, &rA, &rB, &m ), exp_ret ); - mbedtls_mpi_mod_modulus fake_m; - mbedtls_mpi_mod_modulus_init( &fake_m ); - /* Check when m is not initialized */ TEST_EQUAL( mbedtls_mpi_mod_mul( &rX, &rA, &rB, &fake_m ), MBEDTLS_ERR_MPI_BAD_INPUT_DATA );