Skip to content

Commit ae58d91

Browse files
adeaarmvaleriosetti
authored andcommitted
[zep noup] Enable psa_can_do_hash
CC312 driver want to use hash in md for entropy operations. Enable psa_can_do_hash by directly returning 1. This is a workaround for current cc312 driver. After switching to new driver, this workaround is not needed. Signed-off-by: Summer Qin <[email protected]> applied using: git am modules/tee/tf-m/trusted-firmware-m/lib/ext/mbedcrypto/\ 0006-Enable-psa_can_do_hash.patch Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent b50f919 commit ae58d91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/psa_crypto.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ static uint8_t psa_get_drivers_initialized(void)
290290
int psa_can_do_hash(psa_algorithm_t hash_alg)
291291
{
292292
(void) hash_alg;
293-
return psa_get_drivers_initialized();
293+
/* Workaround for the legacy CryptoCell driver requiring hash during init */
294+
return 1; //psa_get_drivers_initialized();
294295
}
295296

296297
int psa_can_do_cipher(psa_key_type_t key_type, psa_algorithm_t cipher_alg)

0 commit comments

Comments
 (0)