mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-14 01:26:49 +00:00
Don't use mbedtls_pk_ec in our own code
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
7e353ba37a
commit
ae2668be97
@ -475,7 +475,7 @@ int mbedtls_pk_get_psa_attributes(const mbedtls_pk_context *pk,
|
||||
size_t bits = psa_get_key_bits(&old_attributes);
|
||||
psa_ecc_family_t family = PSA_KEY_TYPE_ECC_GET_FAMILY(old_type);
|
||||
#else
|
||||
mbedtls_ecp_keypair *ec = mbedtls_pk_ec(*pk);
|
||||
const mbedtls_ecp_keypair *ec = mbedtls_pk_ec_ro(*pk);
|
||||
int has_private = (ec->d.n != 0);
|
||||
size_t bits = 0;
|
||||
psa_ecc_family_t family =
|
||||
|
@ -287,7 +287,7 @@ static int pk_setup_for_type(mbedtls_pk_type_t pk_type, int want_pair,
|
||||
pk->pub_raw, pk->pub_raw_len,
|
||||
&pk->priv_id));
|
||||
#else
|
||||
mbedtls_ecp_keypair *ec = mbedtls_pk_ec(*pk);
|
||||
mbedtls_ecp_keypair *ec = mbedtls_pk_ec_rw(*pk);
|
||||
mbedtls_mpi_free(&ec->d);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user