Skip to content

Commit 3947c84

Browse files
adeaarmtomi-font
authored andcommitted
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 <summer.qin@arm.com> 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 <tomi.fontanilles@nordicsemi.no>
1 parent e7779a8 commit 3947c84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/psa_crypto.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ static uint8_t psa_get_drivers_initialized(void)
288288
int psa_can_do_hash(psa_algorithm_t hash_alg)
289289
{
290290
(void) hash_alg;
291-
return psa_get_drivers_initialized();
291+
/* Workaround for the legacy CryptoCell driver requiring hash during init */
292+
return 1; //psa_get_drivers_initialized();
292293
}
293294

294295
int psa_can_do_cipher(psa_key_type_t key_type, psa_algorithm_t cipher_alg)

0 commit comments

Comments
 (0)