mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Fix status assignments when loading persistent keys
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
@ -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;
|
data = (psa_se_key_data_storage_t *) key_data;
|
||||||
status = psa_copy_key_material_into_slot(
|
status = psa_copy_key_material_into_slot(
|
||||||
slot, data->slot_number, sizeof(data->slot_number));
|
slot, data->slot_number, sizeof(data->slot_number));
|
||||||
|
|
||||||
|
if (status == PSA_SUCCESS) {
|
||||||
|
slot->status = PSA_SLOT_OCCUPIED;
|
||||||
|
}
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||||
|
|
||||||
status = psa_copy_key_material_into_slot(slot, key_data, key_data_length);
|
status = psa_copy_key_material_into_slot(slot, key_data, key_data_length);
|
||||||
if (status != PSA_SUCCESS){
|
if (status != PSA_SUCCESS) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user