mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
ecp_curves: Update pre-processor define guards for ecp_mpi_load()
.
This patch adjusts the logic, so that the method is included, when the following components are enabled: * MBEDTLS_ECP_DP_CURVE448_ENABLED * MBEDTLS_ECP_DP_CURVE25519_ENABLED * ECP_LOAD_GROUP Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
@ -4502,7 +4502,9 @@ static const mbedtls_ecp_point brainpoolP512r1_T[32] = {
|
|||||||
#endif
|
#endif
|
||||||
#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
|
#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
|
||||||
|
|
||||||
#if defined(ECP_LOAD_GROUP)
|
|
||||||
|
#if defined(ECP_LOAD_GROUP) || defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) || \
|
||||||
|
defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
|
||||||
/*
|
/*
|
||||||
* Create an MPI from embedded constants
|
* Create an MPI from embedded constants
|
||||||
* (assumes len is an exact multiple of sizeof mbedtls_mpi_uint)
|
* (assumes len is an exact multiple of sizeof mbedtls_mpi_uint)
|
||||||
@ -4513,7 +4515,9 @@ static inline void ecp_mpi_load(mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_
|
|||||||
X->n = len / sizeof(mbedtls_mpi_uint);
|
X->n = len / sizeof(mbedtls_mpi_uint);
|
||||||
X->p = (mbedtls_mpi_uint *) p;
|
X->p = (mbedtls_mpi_uint *) p;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ECP_LOAD_GROUP)
|
||||||
/*
|
/*
|
||||||
* Set an MPI to static value 1
|
* Set an MPI to static value 1
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user