mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-09 12:40:57 +00:00
psa: Adapt set_key_id() for when owner is included
This commit is contained in:
parent
39f03fcf1a
commit
e3cdf284b2
@ -422,7 +422,14 @@ static inline void psa_set_key_lifetime(psa_key_attributes_t *attributes,
|
|||||||
{
|
{
|
||||||
attributes->core.lifetime = lifetime;
|
attributes->core.lifetime = lifetime;
|
||||||
if( lifetime == PSA_KEY_LIFETIME_VOLATILE )
|
if( lifetime == PSA_KEY_LIFETIME_VOLATILE )
|
||||||
|
{
|
||||||
|
#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;
|
attributes->core.id = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline psa_key_lifetime_t psa_get_key_lifetime(
|
static inline psa_key_lifetime_t psa_get_key_lifetime(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user