@@ -52,7 +52,7 @@ int inject_dummy_rot_key()
52
52
53
53
memcpy (key, " 1234567812345678" , DEVICE_KEY_16BYTE);
54
54
int size = DEVICE_KEY_16BYTE;
55
- DeviceKey& devkey = DeviceKey::get_instance ();
55
+ DeviceKey & devkey = DeviceKey::get_instance ();
56
56
return devkey.device_inject_root_of_trust (key, size);
57
57
#else
58
58
return DEVICEKEY_SUCCESS;
@@ -86,8 +86,8 @@ void generate_derived_key_consistency_16_byte_key_long_consistency_test(char *ke
86
86
unsigned char salt[] = " Once upon a time, I worked for the circus and I lived in Omaha." ;
87
87
int key_type = DEVICE_KEY_16BYTE;
88
88
uint16_t actual_size = 0 ;
89
- DeviceKey& devkey = DeviceKey::get_instance ();
90
- NVStore& nvstore = NVStore::get_instance ();
89
+ DeviceKey & devkey = DeviceKey::get_instance ();
90
+ NVStore & nvstore = NVStore::get_instance ();
91
91
size_t salt_size = sizeof (salt);
92
92
93
93
if (strcmp (key, MSG_KEY_DEVICE_TEST_STEP1) == 0 ) {
@@ -145,8 +145,8 @@ void generate_derived_key_consistency_32_byte_key_long_consistency_test(char *ke
145
145
unsigned char salt[] = " The quick brown fox jumps over the lazy dog" ;
146
146
int key_type = DEVICE_KEY_32BYTE;
147
147
uint16_t actual_size = 0 ;
148
- DeviceKey& devkey = DeviceKey::get_instance ();
149
- NVStore& nvstore = NVStore::get_instance ();
148
+ DeviceKey & devkey = DeviceKey::get_instance ();
149
+ NVStore & nvstore = NVStore::get_instance ();
150
150
size_t salt_size = sizeof (salt);
151
151
152
152
if (strcmp (key, MSG_KEY_DEVICE_TEST_STEP3) == 0 ) {
@@ -198,7 +198,7 @@ void generate_derived_key_consistency_32_byte_key_long_consistency_test(char *ke
198
198
*/
199
199
void device_inject_root_of_trust_wrong_size_test ()
200
200
{
201
- DeviceKey& devkey = DeviceKey::get_instance ();
201
+ DeviceKey & devkey = DeviceKey::get_instance ();
202
202
uint32_t key[DEVICE_KEY_32BYTE / sizeof (uint32_t )];
203
203
204
204
memcpy (key, " 12345678123456788765432187654321" , DEVICE_KEY_32BYTE);
@@ -217,11 +217,11 @@ void device_inject_root_of_trust_wrong_size_test()
217
217
*/
218
218
void device_inject_root_of_trust_16_byte_size_test ()
219
219
{
220
- DeviceKey& devkey = DeviceKey::get_instance ();
220
+ DeviceKey & devkey = DeviceKey::get_instance ();
221
221
uint32_t rkey[DEVICE_KEY_16BYTE / sizeof (uint32_t )];
222
222
uint16_t actual_size;
223
223
uint32_t key[DEVICE_KEY_16BYTE / sizeof (uint32_t )];
224
- NVStore& nvstore = NVStore::get_instance ();
224
+ NVStore & nvstore = NVStore::get_instance ();
225
225
226
226
int ret = nvstore.reset ();
227
227
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -243,11 +243,11 @@ void device_inject_root_of_trust_16_byte_size_test()
243
243
*/
244
244
void device_inject_root_of_trust_32_byte_size_test ()
245
245
{
246
- DeviceKey& devkey = DeviceKey::get_instance ();
246
+ DeviceKey & devkey = DeviceKey::get_instance ();
247
247
uint32_t rkey[DEVICE_KEY_32BYTE / sizeof (uint32_t )];
248
248
uint16_t actual_size;
249
249
uint32_t key[DEVICE_KEY_32BYTE / sizeof (uint32_t )];
250
- NVStore& nvstore = NVStore::get_instance ();
250
+ NVStore & nvstore = NVStore::get_instance ();
251
251
252
252
int ret = nvstore.reset ();
253
253
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -269,9 +269,9 @@ void device_inject_root_of_trust_32_byte_size_test()
269
269
*/
270
270
void device_inject_root_of_trust_several_times_test ()
271
271
{
272
- DeviceKey& devkey = DeviceKey::get_instance ();
272
+ DeviceKey & devkey = DeviceKey::get_instance ();
273
273
uint32_t key[DEVICE_KEY_32BYTE / sizeof (uint32_t )];
274
- NVStore& nvstore = NVStore::get_instance ();
274
+ NVStore & nvstore = NVStore::get_instance ();
275
275
276
276
int ret = nvstore.reset ();
277
277
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -299,8 +299,8 @@ void generate_derived_key_consistency_16_byte_key_test()
299
299
unsigned char empty_buffer[DEVICE_KEY_16BYTE];
300
300
unsigned char salt[] = " Once upon a time, I worked for the circus and I lived in Omaha." ;
301
301
int key_type = DEVICE_KEY_16BYTE;
302
- DeviceKey& devkey = DeviceKey::get_instance ();
303
- NVStore& nvstore = NVStore::get_instance ();
302
+ DeviceKey & devkey = DeviceKey::get_instance ();
303
+ NVStore & nvstore = NVStore::get_instance ();
304
304
305
305
int ret = nvstore.reset ();
306
306
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -334,8 +334,8 @@ void generate_derived_key_consistency_32_byte_key_test()
334
334
unsigned char empty_buffer[DEVICE_KEY_32BYTE];
335
335
unsigned char salt[] = " The quick brown fox jumps over the lazy dog" ;
336
336
int key_type = DEVICE_KEY_32BYTE;
337
- DeviceKey& devkey = DeviceKey::get_instance ();
338
- NVStore& nvstore = NVStore::get_instance ();
337
+ DeviceKey & devkey = DeviceKey::get_instance ();
338
+ NVStore & nvstore = NVStore::get_instance ();
339
339
340
340
int ret = nvstore.reset ();
341
341
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -369,8 +369,8 @@ void generate_derived_key_key_type_16_test()
369
369
unsigned char expectedString[] = " Some String" ;
370
370
int key_type = DEVICE_KEY_16BYTE;
371
371
size_t salt_size = sizeof (salt);
372
- DeviceKey& devkey = DeviceKey::get_instance ();
373
- NVStore& nvstore = NVStore::get_instance ();
372
+ DeviceKey & devkey = DeviceKey::get_instance ();
373
+ NVStore & nvstore = NVStore::get_instance ();
374
374
375
375
int ret = nvstore.reset ();
376
376
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -400,8 +400,8 @@ void generate_derived_key_key_type_32_test()
400
400
int key_type = DEVICE_KEY_32BYTE;
401
401
size_t salt_size = sizeof (salt);
402
402
unsigned char expectedString[] = " Some String" ;
403
- DeviceKey& devkey = DeviceKey::get_instance ();
404
- NVStore& nvstore = NVStore::get_instance ();
403
+ DeviceKey & devkey = DeviceKey::get_instance ();
404
+ NVStore & nvstore = NVStore::get_instance ();
405
405
406
406
int ret = nvstore.reset ();
407
407
TEST_ASSERT_EQUAL_INT (DEVICEKEY_SUCCESS, ret);
@@ -429,8 +429,8 @@ void generate_derived_key_wrong_key_type_test()
429
429
unsigned char output[DEVICE_KEY_16BYTE];
430
430
unsigned char salt[] = " The quick brown fox jumps over the lazy dog" ;
431
431
size_t salt_size = sizeof (salt);
432
- DeviceKey& devkey = DeviceKey::get_instance ();
433
- NVStore& nvstore = NVStore::get_instance ();
432
+ DeviceKey & devkey = DeviceKey::get_instance ();
433
+ NVStore & nvstore = NVStore::get_instance ();
434
434
435
435
nvstore.init ();
436
436
int ret = nvstore.reset ();
0 commit comments