24
24
#include " unity/unity.h"
25
25
#include " utest/utest.h"
26
26
#include " psa/internal_trusted_storage.h"
27
- #include " test_pits .h"
27
+ #include " psa/lifecycle .h"
28
28
29
29
using namespace utest ::v1;
30
30
@@ -38,7 +38,7 @@ static void pits_test()
38
38
struct psa_its_info_t info = {0 , PSA_ITS_FLAG_WRITE_ONCE};
39
39
memset (read_buff, 0 , TEST_BUFF_SIZE);
40
40
41
- status = test_psa_its_reset ( );
41
+ status = mbed_psa_reboot_and_request_new_security_state (PSA_LIFECYCLE_ASSEMBLY_AND_TEST );
42
42
TEST_ASSERT_EQUAL (PSA_ITS_SUCCESS, status);
43
43
44
44
status = psa_its_get_info (5 , &info);
@@ -76,9 +76,9 @@ static void pits_write_once_test()
76
76
psa_its_status_t status = PSA_ITS_SUCCESS;
77
77
uint8_t write_buff[TEST_BUFF_SIZE] = {0x0F , 0x0E , 0x0D , 0x0C , 0x0B , 0x0A , 0x09 , 0x08 , 0x07 , 0x06 , 0x05 , 0x04 , 0x03 , 0x02 , 0x01 , 0x00 };
78
78
uint8_t read_buff[TEST_BUFF_SIZE] = {0 };
79
- struct psa_its_info_t info = {0 , PSA_ITS_FLAG_NONE };
79
+ struct psa_its_info_t info = {0 , 0 };
80
80
81
- status = test_psa_its_reset ( );
81
+ status = mbed_psa_reboot_and_request_new_security_state (PSA_LIFECYCLE_ASSEMBLY_AND_TEST );
82
82
TEST_ASSERT_EQUAL (PSA_ITS_SUCCESS, status);
83
83
84
84
status = psa_its_get_info (5 , &info);
@@ -114,7 +114,7 @@ static void pits_write_once_test()
114
114
TEST_ASSERT_EQUAL (TEST_BUFF_SIZE, info.size );
115
115
TEST_ASSERT_EQUAL (PSA_ITS_FLAG_WRITE_ONCE, info.flags );
116
116
117
- status = test_psa_its_reset ( );
117
+ status = mbed_psa_reboot_and_request_new_security_state (PSA_LIFECYCLE_ASSEMBLY_AND_TEST );
118
118
TEST_ASSERT_EQUAL (PSA_ITS_SUCCESS, status);
119
119
}
120
120
0 commit comments