1From b9e1f06ba19b1c05557fd082ea8fa2f8f1b0c0a2 Mon Sep 17 00:00:00 2001 2From: Antonio de Angelis <Antonio.deAngelis@arm.com> 3Date: Thu, 21 Mar 2024 13:02:44 +0000 4Subject: [PATCH 6/6] Enable psa_can_do_hash 5 6CC312 driver want to use hash in md for entropy operations. 7Enable psa_can_do_hash by directly returning 1. 8This is a workaround for current cc312 driver. After switching 9to new driver, this workaround is not needed. 10 11Signed-off-by: Summer Qin <summer.qin@arm.com> 12--- 13 library/psa_crypto.c | 3 ++- 14 1 file changed, 2 insertions(+), 1 deletion(-) 15 16diff --git a/library/psa_crypto.c b/library/psa_crypto.c 17index d3f729320..68895738e 100644 18--- a/library/psa_crypto.c 19+++ b/library/psa_crypto.c 20@@ -288,7 +288,8 @@ static uint8_t psa_get_drivers_initialized(void) 21 int psa_can_do_hash(psa_algorithm_t hash_alg) 22 { 23 (void) hash_alg; 24- return psa_get_drivers_initialized(); 25+ /* Workaround for the legacy CryptoCell driver requiring hash during init */ 26+ return 1; //psa_get_drivers_initialized(); 27 } 28 29 int psa_can_do_cipher(psa_key_type_t key_type, psa_algorithm_t cipher_alg) 30-- 312.34.1 32 33