@@ -40,18 +40,6 @@ static uint8_t _salt_root[KEYSTORE_MAX_SEED_LENGTH] = {
40
40
0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 ,
41
41
};
42
42
43
- static uint8_t _mock_seed [32 ] = {
44
- 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 ,
45
- 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 ,
46
- };
47
-
48
- static uint8_t _mock_bip39_seed [64 ] = {
49
- 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 ,
50
- 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 ,
51
- 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x11 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 , 0x22 ,
52
- 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x33 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 , 0x44 ,
53
- };
54
-
55
43
// Same as Python:
56
44
// import hmac, hashlib; hmac.digest(b"unit-test", b"password", hashlib.sha256).hex()
57
45
// See also: securechip_mock.c
@@ -109,18 +97,6 @@ static void _expect_encrypt_and_store_seed(void)
109
97
will_return (__wrap_memory_is_initialized , false);
110
98
}
111
99
112
- static void _test_keystore_lock (void * * state )
113
- {
114
- _mock_unlocked (NULL , 0 , NULL );
115
- assert_true (keystore_is_locked ());
116
- _mock_unlocked (_mock_seed , sizeof (_mock_seed ), NULL );
117
- assert_true (keystore_is_locked ());
118
- _mock_unlocked (_mock_seed , sizeof (_mock_seed ), _mock_bip39_seed );
119
- assert_false (keystore_is_locked ());
120
- keystore_lock ();
121
- assert_true (keystore_is_locked ());
122
- }
123
-
124
100
static void _test_keystore_create_and_store_seed (void * * state )
125
101
{
126
102
const uint8_t seed_random [32 ] =
@@ -282,7 +258,6 @@ int main(void)
282
258
mock_memory_set_salt_root (_salt_root );
283
259
284
260
const struct CMUnitTest tests [] = {
285
- cmocka_unit_test (_test_keystore_lock ),
286
261
cmocka_unit_test (_test_keystore_create_and_store_seed ),
287
262
cmocka_unit_test (_test_secp256k1_schnorr_sign ),
288
263
cmocka_unit_test (_test_keystore_secp256k1_schnorr_sign ),
0 commit comments