Skip to content
Commit 78b0d54d authored by Sona Rebecca Mathew's avatar Sona Rebecca Mathew Committed by Soby Mathew
Browse files

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 Rebecca Mathew's avatarSona Mathew <sonarebecca.mathew@arm.com>
parent d964e7fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment