psa: Don't reset the key owner id in psa_set_key_lifetime

As a volatile key identifier may have a non-zero owner
identifier, don't reset the key owner identifier (if any)
when setting a volatile lifetime for a key.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2020-07-24 14:50:11 +02:00
parent 039a98b598
commit fa7d7af55d

View file

@ -381,7 +381,6 @@ static inline void psa_set_key_lifetime(psa_key_attributes_t *attributes,
{
#ifdef MBEDTLS_PSA_CRYPTO_KEY_FILE_ID_ENCODES_OWNER
attributes->core.id.key_id = 0;
attributes->core.id.owner = 0;
#else
attributes->core.id = 0;
#endif