mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 20:42:44 +00:00
Add AES_PSA_INIT() to thread test case
Tests were failing when PSA was being used in ctr_drbg_seed() as PSA was not initialised. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
445af3c25a
commit
22dbaf05b6
@ -356,6 +356,8 @@ void ctr_drbg_threads(data_t *expected_result, int reseed, int arg_thread_count)
|
|||||||
/* Based on the size of MBEDTLS_CTR_DRBG_ENTROPY_LEN for SHA512. */
|
/* Based on the size of MBEDTLS_CTR_DRBG_ENTROPY_LEN for SHA512. */
|
||||||
const size_t entropy_len = 48;
|
const size_t entropy_len = 48;
|
||||||
|
|
||||||
|
AES_PSA_INIT();
|
||||||
|
|
||||||
TEST_CALLOC(threads, sizeof(pthread_t) * thread_count);
|
TEST_CALLOC(threads, sizeof(pthread_t) * thread_count);
|
||||||
memset(out, 0, sizeof(out));
|
memset(out, 0, sizeof(out));
|
||||||
|
|
||||||
@ -408,6 +410,8 @@ exit:
|
|||||||
mbedtls_ctr_drbg_free(&ctx);
|
mbedtls_ctr_drbg_free(&ctx);
|
||||||
mbedtls_free(entropy);
|
mbedtls_free(entropy);
|
||||||
mbedtls_free(threads);
|
mbedtls_free(threads);
|
||||||
|
|
||||||
|
AES_PSA_DONE();
|
||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user