Fix some preprocessor guards
Fix the build in some configurations.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/library/pk.c b/library/pk.c
index f623af9..28663a8 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -784,8 +784,7 @@
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(