Move variant test to ecp_curves
We would like to de-duplicate ecp.c, but ecp_curves.c remains duplicated and we still want to test for the active variant. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
parent
9661f8ab0d
commit
c25567af23
4 changed files with 21 additions and 20 deletions
|
@ -3638,16 +3638,6 @@ cleanup:
|
|||
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
|
||||
MBEDTLS_STATIC_TESTABLE
|
||||
mbedtls_ecp_variant mbedtls_ecp_get_variant(void)
|
||||
{
|
||||
return MBEDTLS_ECP_VARIANT_WITH_MPI_STRUCT;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_TEST_HOOKS */
|
||||
|
||||
#endif /* !MBEDTLS_ECP_ALT */
|
||||
|
||||
#endif /* MBEDTLS_ECP_LIGHT */
|
||||
|
|
|
@ -5463,6 +5463,16 @@ static int ecp_mod_p256k1(mbedtls_mpi *N)
|
|||
}
|
||||
#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
|
||||
MBEDTLS_STATIC_TESTABLE
|
||||
mbedtls_ecp_variant mbedtls_ecp_get_variant(void)
|
||||
{
|
||||
return MBEDTLS_ECP_VARIANT_WITH_MPI_STRUCT;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_TEST_HOOKS */
|
||||
|
||||
#endif /* !MBEDTLS_ECP_ALT */
|
||||
|
||||
#endif /* MBEDTLS_ECP_LIGHT */
|
||||
|
|
|
@ -6039,6 +6039,17 @@ int mbedtls_ecp_modulus_setup(mbedtls_mpi_mod_modulus *N,
|
|||
return 0;
|
||||
}
|
||||
#endif /* MBEDTLS_TEST_HOOKS */
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
|
||||
MBEDTLS_STATIC_TESTABLE
|
||||
mbedtls_ecp_variant mbedtls_ecp_get_variant(void)
|
||||
{
|
||||
return MBEDTLS_ECP_VARIANT_WITH_MPI_UINT;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_TEST_HOOKS */
|
||||
|
||||
#endif /* !MBEDTLS_ECP_ALT */
|
||||
#endif /* MBEDTLS_ECP_LIGHT */
|
||||
#endif /* MBEDTLS_ECP_WITH_MPI_UINT */
|
||||
|
|
|
@ -3638,16 +3638,6 @@ cleanup:
|
|||
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
|
||||
MBEDTLS_STATIC_TESTABLE
|
||||
mbedtls_ecp_variant mbedtls_ecp_get_variant()
|
||||
{
|
||||
return MBEDTLS_ECP_VARIANT_WITH_MPI_UINT;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_TEST_HOOKS */
|
||||
|
||||
#endif /* !MBEDTLS_ECP_ALT */
|
||||
|
||||
#endif /* MBEDTLS_ECP_LIGHT */
|
||||
|
|
Loading…
Reference in a new issue