Skip to content

Commit

Permalink
ta: pkcs11: correct RSA keys extended attributes sanitation
Browse files Browse the repository at this point in the history
Fix RSA key attributes function load_tee_rsa_key_attrs() that badly
checks that the 5 extended RSA attributes are found in the key object.

Link: OP-TEE/optee_test#721 (comment)
Link: OP-TEE/optee_test#721 (comment)
Fixes: 0442c95 ("ta: pkcs11: Add support for RSA signing & verification")
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
etienne-lms committed Apr 24, 2024
1 parent 08204d7 commit ee4eade
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ta/pkcs11/src/processing_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ enum pkcs11_rc load_tee_rsa_key_attrs(TEE_Attribute **tee_attrs,
break;
}

rc = PKCS11_CKR_GENERAL_ERROR;

if (pkcs2tee_load_attr(&attrs[count], TEE_ATTR_RSA_PRIME1, obj,
PKCS11_CKA_PRIME_1))
count++;
Expand Down

0 comments on commit ee4eade

Please sign in to comment.