fix(lib/attestation): error handling in attest key init sequence
Currently in the function attest_init_realm_attestation_key
if the psa_import_key fails in the key initialization sequence,
the function returns without releasing the shared buffer.
This patch adds the rmm_el3_ifc_release_shared_buf() function
to the return sequence to release the buffer in case of a
failure to avoid deadlock.
This patch also modifies the code to ensure that the flag
attest_signing_key_loaded is set to true only if the
psa_import_key and the psa_hash_compute are both successful.
Closes #25
Change-Id: I46a4d223ae9c7f4a159005345f62c34517cf68ed
Signed-off-by:
Sona Mathew <sonarebecca.mathew@arm.com>
Loading
Please register or sign in to comment