mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Refactor lifetime checking to reflect split in location and persistence
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
@ -200,7 +200,10 @@ psa_status_t psa_validate_persistent_key_parameters(
|
||||
}
|
||||
else
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
if( lifetime != PSA_KEY_LIFETIME_PERSISTENT )
|
||||
if( ( PSA_KEY_LIFETIME_GET_LOCATION( lifetime )
|
||||
!= PSA_KEY_LOCATION_LOCAL_STORAGE ) ||
|
||||
( PSA_KEY_LIFETIME_GET_PERSISTENCE( lifetime )
|
||||
!= PSA_KEY_PERSISTENCE_DEFAULT ) )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)
|
||||
|
Reference in New Issue
Block a user