Revert "Refactor psa_load_persistent_key_into_slot
to remove bad goto
"
This reverts commit d69f4017fb
.
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
d69f4017fb
commit
2a0d4e2995
1 changed files with 7 additions and 3 deletions
|
@ -234,10 +234,14 @@ static psa_status_t psa_load_persistent_key_into_slot(psa_key_slot_t *slot)
|
||||||
status = PSA_ERROR_DATA_INVALID;
|
status = PSA_ERROR_DATA_INVALID;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = (psa_se_key_data_storage_t *) key_data;
|
data = (psa_se_key_data_storage_t *) key_data;
|
||||||
key_data = data->slot_number;
|
status = psa_copy_key_material_into_slot(
|
||||||
key_data_length = sizeof(key_data);
|
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 */
|
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue