File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 9393 */
9494 static const char * pNoLowLevelMbedTlsCodeStr = "<No-Low-Level-Code>" ;
9595
96+ #if defined(MBEDTLS_PSA_CRYPTO_C )
97+ extern mbedtls_threading_mutex_t mbedtls_threading_key_slot_mutex ;
98+ extern mbedtls_threading_mutex_t mbedtls_threading_psa_globaldata_mutex ;
99+ extern mbedtls_threading_mutex_t mbedtls_threading_psa_rngdata_mutex ;
100+ #endif
101+
96102/**
97103 * @brief Utility for converting the high-level code in an mbedTLS error to string,
98104 * if the code-contains a high-level code; otherwise, using a default string.
@@ -475,6 +481,12 @@ static CK_RV prvMbedTLS_Initialize( void )
475481 mbedtls_entropy_init ( & xP11Context .xMbedEntropyContext );
476482 mbedtls_ctr_drbg_init ( & xP11Context .xMbedDrbgCtx );
477483
484+ #if defined(MBEDTLS_PSA_CRYPTO_C )
485+ mbedtls_mutex_init (& mbedtls_threading_key_slot_mutex );
486+ mbedtls_mutex_init (& mbedtls_threading_psa_globaldata_mutex );
487+ mbedtls_mutex_init (& mbedtls_threading_psa_rngdata_mutex );
488+ #endif
489+
478490 lMbedTLSResult = mbedtls_ctr_drbg_seed ( & xP11Context .xMbedDrbgCtx ,
479491 mbedtls_entropy_func ,
480492 & xP11Context .xMbedEntropyContext ,
You can’t perform that action at this time.
0 commit comments