mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 05:45:41 +00:00
psa: Call init when importing private EC keys
Previously we weren't initializing the freshly allocated ECP keypair when importing private EC keys. This didn't seem to cause problems, at least according to our current test coverage, but it's better to ensure we don't have a partially initialized object by explicitly initializing the keypair.
This commit is contained in:
parent
d6292ca57b
commit
83d293951c
|
@ -572,6 +572,7 @@ static psa_status_t psa_import_ec_private_key( psa_ecc_curve_t curve,
|
|||
ecp = mbedtls_calloc( 1, sizeof( mbedtls_ecp_keypair ) );
|
||||
if( ecp == NULL )
|
||||
return( PSA_ERROR_INSUFFICIENT_MEMORY );
|
||||
mbedtls_ecp_keypair_init( ecp );
|
||||
|
||||
/* Load the group. */
|
||||
status = mbedtls_to_psa_error(
|
||||
|
|
Loading…
Reference in a new issue