From 6b9b1b88fbebc9d7a6a7c350191c13c99446edac Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Wed, 15 May 2019 17:04:33 +0300 Subject: [PATCH] Initialize psa_crypto in ssl test Call `psa_crypto_init()` in `tls_prf` ssl test in case `MBEDTLS_USE_PSA_CRYPTO` is defined since tls_prf may use psa crypto. --- tests/suites/test_suite_ssl.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 69b97789f..ecf186ed3 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -552,6 +552,10 @@ void ssl_tls_prf( int type, data_t * secret, data_t * random, if( output == NULL ) goto exit; +#if defined(MBEDTLS_USE_PSA_CRYPTO) + TEST_ASSERT( psa_crypto_init() == 0 ); +#endif + TEST_ASSERT( mbedtls_ssl_tls_prf( type, secret->x, secret->len, label, random->x, random->len, output, result_hex_str->len ) == exp_ret );