blob: defc3f150d6d8879620fb41701318981593bde68 [file] [log] [blame]
From ba5d54dc39ca40e6b224dd2bcce9eea9e8998aff Mon Sep 17 00:00:00 2001
From: Antonio de Angelis <Antonio.deAngelis@arm.com>
Date: Thu, 21 Mar 2024 11:58:19 +0000
Subject: [PATCH 4/7] Initialise driver wrappers as first step in
psa_crypto_init()
This patch amends the order of initialisations performed in
psa_crypto_init() to make sure that the driver wrappers based
on the PSA driver API are initialised just after the key slots
in memory, both of them at the beginning of the initialisation
sequence.
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
---
library/psa_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 75a7034ee..08906dc68 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -8483,12 +8483,12 @@ psa_status_t psa_crypto_init(void)
return PSA_SUCCESS;
}
- status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS);
+ status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS);
if (status != PSA_SUCCESS) {
goto exit;
}
- status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS);
+ status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS);
if (status != PSA_SUCCESS) {
goto exit;
}
--
2.34.1