1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Fix some preprocessor guards

Fix the build in some configurations.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-02-12 14:18:26 +01:00
parent 74860ddec2
commit 1d33876d37
3 changed files with 15 additions and 12 deletions

View File

@ -784,8 +784,7 @@ static int import_public_into_psa(const mbedtls_pk_context *pk,
size_t from_bits = 0;
psa_ecc_family_t from_family = mbedtls_ecc_group_to_psa(ec->grp.id,
&from_bits);
psa_key_type_t to_type = psa_get_key_type(attributes);
if (to_type != PSA_KEY_TYPE_ECC_PUBLIC_KEY(from_family)) {
if (psa_type != PSA_KEY_TYPE_ECC_PUBLIC_KEY(from_family)) {
return MBEDTLS_ERR_PK_TYPE_MISMATCH;
}
int ret = mbedtls_ecp_write_public_key(