mbedtls: add psa_crypto_init() when Mbed TLS acts a PSA crypto client
Ensure psa_crypto_init() is called during initialization when Mbed TLS acts as a PSA crypto client. This will setup the PSA crypto server for further calls. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
185ec2bf78
commit
69fa93bb79
|
@ -94,6 +94,12 @@ static int _mbedtls_init(void)
|
|||
mbedtls_debug_set_threshold(CONFIG_MBEDTLS_DEBUG_LEVEL);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT)
|
||||
if (psa_crypto_init() != PSA_SUCCESS) {
|
||||
return -EIO;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue