net: openthread: Initialize PSA crypto when random is initializing

The psa_generate_random function requires the psa_crypto_init call
before the usage. This can be ensured by calling the psa_crypto_init
in otPlatCryptoRandomInitfunction.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
This commit is contained in:
Arkadiusz Balys 2023-07-31 14:36:57 +02:00 committed by Fabio Baltieri
commit f16f1ae819

View file

@ -415,6 +415,7 @@ otError otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint
void otPlatCryptoRandomInit(void)
{
psa_crypto_init();
}
void otPlatCryptoRandomDeinit(void)