@@ -94,12 +94,8 @@ int suiteTearDown(int failures)
9494void _setUp (void )
9595{
9696 setenv ("BSL_TEST_LOCAL_IPN_EID" , "ipn:2.1" , 1 );
97- memset (& LocalTestCtx , 0 , sizeof (LocalTestCtx ));
98- TEST_ASSERT_EQUAL (0 , BSL_API_InitLib (& LocalTestCtx .bsl ));
99- mock_bpa_ctr_init (& LocalTestCtx .mock_bpa_ctr );
100- memset (& action_set , 0 , sizeof (action_set ));
101-
10297 BSL_CryptoInit ();
98+ TEST_ASSERT_EQUAL (0 , BSL_TestContext_Init (& LocalTestCtx , true));
10399
104100 BSL_SecParam_Init (& param_aes_variant_128 );
105101 BSL_SecParam_Init (& param_use_wrap_key );
@@ -143,18 +139,14 @@ void _setUp(void)
143139 BSLP_PolicyRule_CopyParam (rule_bsl_32b , & param_test_bcb_key_correct );
144140 BSLP_PolicyRule_CopyParam (rule_bsl_32b , & param_aes_variant_128 );
145141 BSLP_PolicyRule_CopyParam (rule_bsl_32b , & param_use_wrap_key );
146-
147- /// Register the Security Context
148- BSL_TestUtils_SetupDefaultSecurityContext (& LocalTestCtx .bsl );
149142}
150143
151144// manually call this to control dynamic mem callback tracking for test
152145void _tearDown (void )
153146{
154147 BSL_SecurityActionSet_Deinit (& action_set );
155- mock_bpa_ctr_deinit (& LocalTestCtx .mock_bpa_ctr );
156148 BSL_CryptoDeinit ();
157- TEST_ASSERT_EQUAL (0 , BSL_API_DeinitLib (& LocalTestCtx . bsl ));
149+ TEST_ASSERT_EQUAL (0 , BSL_TestContext_Deinit (& LocalTestCtx ));
158150
159151 BSL_SecParam_Deinit (& param_aes_variant_128 );
160152 BSL_SecParam_Deinit (& param_use_wrap_key );
0 commit comments