commit | ac5b32b8944485bfb1a517d09a6e77f4181effb9 | [log] [tgz] |
---|---|---|
author | Ryan Everett <ryan.everett@arm.com> | Wed Nov 15 16:26:01 2023 +0000 |
committer | Ryan Everett <ryan.everett@arm.com> | Wed Nov 15 16:26:01 2023 +0000 |
tree | d0dc47602937f1eae898e7f9e79366adfefa1d56 | |
parent | dc848955d65d5048c63ff5736753c8504bce68e1 [diff] [blame] |
Fix error handling for secure element keys in `psa_start_key_creation` Signed-off-by: Ryan Everett <ryan.everett@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c index bbd6b24..4beda81 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c
@@ -1841,6 +1841,9 @@ status = psa_copy_key_material_into_slot( slot, (uint8_t *) (&slot_number), sizeof(slot_number)); + if (status != PSA_SUCCESS) { + return status; + } } if (*p_drv == NULL && method == PSA_KEY_CREATION_REGISTER) {