Fix status assignments when loading persistent keys
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
975d411d92
commit
9f176a2766
1 changed files with 5 additions and 1 deletions
|
@ -237,12 +237,16 @@ static psa_status_t psa_load_persistent_key_into_slot(psa_key_slot_t *slot)
|
|||
data = (psa_se_key_data_storage_t *) key_data;
|
||||
status = psa_copy_key_material_into_slot(
|
||||
slot, data->slot_number, sizeof(data->slot_number));
|
||||
|
||||
if (status == PSA_SUCCESS) {
|
||||
slot->status = PSA_SLOT_OCCUPIED;
|
||||
}
|
||||
goto exit;
|
||||
}
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
|
||||
status = psa_copy_key_material_into_slot(slot, key_data, key_data_length);
|
||||
if (status != PSA_SUCCESS){
|
||||
if (status != PSA_SUCCESS) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue