1From ba6536c5140df75a669fc92cdef2729a6913f6af Mon Sep 17 00:00:00 2001 2From: Antonio de Angelis <Antonio.deAngelis@arm.com> 3Date: Thu, 21 Mar 2024 11:58:19 +0000 4Subject: [PATCH 4/7] Initialise driver wrappers as first step in 5 psa_crypto_init() 6 7This patch amends the order of initialisations performed in 8psa_crypto_init() to make sure that the driver wrappers based 9on the PSA driver API are initialised just after the key slots 10in memory, both of them at the beginning of the initialisation 11sequence. 12 13Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com> 14--- 15 library/psa_crypto.c | 4 ++-- 16 1 file changed, 2 insertions(+), 2 deletions(-) 17 18diff --git a/library/psa_crypto.c b/library/psa_crypto.c 19index fd1d28fc6..1d91739da 100644 20--- a/library/psa_crypto.c 21+++ b/library/psa_crypto.c 22@@ -8274,12 +8274,12 @@ psa_status_t psa_crypto_init(void) 23 return PSA_SUCCESS; 24 } 25 26- status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS); 27+ status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS); 28 if (status != PSA_SUCCESS) { 29 goto exit; 30 } 31 32- status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS); 33+ status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS); 34 if (status != PSA_SUCCESS) { 35 goto exit; 36 } 37-- 382.34.1 39 40