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.
This commit is contained in:
Ron Eldor 2019-05-15 17:04:33 +03:00
parent d2f25f7ea8
commit 6b9b1b88fb

View File

@ -552,6 +552,10 @@ void ssl_tls_prf( int type, data_t * secret, data_t * random,
if( output == NULL ) if( output == NULL )
goto exit; 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, TEST_ASSERT( mbedtls_ssl_tls_prf( type, secret->x, secret->len,
label, random->x, random->len, label, random->x, random->len,
output, result_hex_str->len ) == exp_ret ); output, result_hex_str->len ) == exp_ret );