mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Merge pull request #3996 from stevew817/feature/allow_reading_external_keys
Allow loading external wrapped keys
This commit is contained in:
@ -2358,6 +2358,15 @@ psa_status_t psa_import_key( const psa_key_attributes_t *attributes,
|
||||
}
|
||||
else
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
if( psa_key_lifetime_is_external( psa_get_key_lifetime( attributes ) ) )
|
||||
{
|
||||
/* Importing a key with external lifetime through the driver wrapper
|
||||
* interface is not yet supported. Return as if this was an invalid
|
||||
* lifetime. */
|
||||
status = PSA_ERROR_INVALID_ARGUMENT;
|
||||
goto exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = psa_import_key_into_slot( slot, data, data_length );
|
||||
if( status != PSA_SUCCESS )
|
||||
|
Reference in New Issue
Block a user