mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-21 12:40:51 +03:00
Rename ECC Family Macros According to PSA Spec
Rename PSA_ECC_CURVE_xxx to PSA_ECC_FAMILY_xxx, also rename PSA_KEY_TYPE_GET_CURVE to PSA_KEY_TYPE_ECC_GET_FAMILY and rename psa_ecc_curve_t to psa_ecc_family_t. Old defines are provided in include/crypto_compat.h for backward compatibility. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@@ -160,12 +160,12 @@ static inline psa_algorithm_t mbedtls_psa_translate_md( mbedtls_md_type_t md_alg
|
||||
/* Translations for ECC. */
|
||||
|
||||
static inline int mbedtls_psa_get_ecc_oid_from_id(
|
||||
psa_ecc_curve_t curve, size_t bits,
|
||||
psa_ecc_family_t curve, size_t bits,
|
||||
char const **oid, size_t *oid_len )
|
||||
{
|
||||
switch( curve )
|
||||
{
|
||||
case PSA_ECC_CURVE_SECP_R1:
|
||||
case PSA_ECC_FAMILY_SECP_R1:
|
||||
switch( bits )
|
||||
{
|
||||
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
|
||||
@@ -200,7 +200,7 @@ static inline int mbedtls_psa_get_ecc_oid_from_id(
|
||||
#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */
|
||||
}
|
||||
break;
|
||||
case PSA_ECC_CURVE_SECP_K1:
|
||||
case PSA_ECC_FAMILY_SECP_K1:
|
||||
switch( bits )
|
||||
{
|
||||
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
|
||||
@@ -223,7 +223,7 @@ static inline int mbedtls_psa_get_ecc_oid_from_id(
|
||||
#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */
|
||||
}
|
||||
break;
|
||||
case PSA_ECC_CURVE_BRAINPOOL_P_R1:
|
||||
case PSA_ECC_FAMILY_BRAINPOOL_P_R1:
|
||||
switch( bits )
|
||||
{
|
||||
#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
|
||||
|
||||
Reference in New Issue
Block a user