Skip to content

Commit

Permalink
test new test to see if iot fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Nov 30, 2023
1 parent eb28e22 commit 3b82350
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/protocols/secure_channel/tests/TestCheckinMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,21 @@ void TestCheckin_GenerateParse(nlTestSuite * inSuite, void * inContext)
{
const ccm_128_test_vector & test = *testPtr;

Aes128KeyByteArray keyMaterial;
memcpy(keyMaterial, test.key, test.key_len);
Aes128KeyByteArray keyMaterial1;
memcpy(keyMaterial1, test.key, test.key_len);

Aes128KeyByteArray keyMaterial2;
memcpy(keyMaterial2, test.key, test.key_len);

Aes128KeyHandle keyHandle1;
NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle1));
NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial1, keyHandle1));

Aes128KeyHandle keyHandle2;
NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle2));
NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial2, keyHandle2));

printf("----------------------- %d-------------------------\n", memcmp(keyHandle1.As<Aes128KeyByteArray>(), keyHandle2.As<Aes128KeyByteArray>(), (size_t)sizeof(Aes128KeyByteArray)));

NL_TEST_ASSERT(inSuite, memcmp(keyHandle1.As<Aes128KeyByteArray>(), keyHandle2.As<Aes128KeyByteArray>(), (size_t)sizeof(Aes128KeyByteArray)) == 0);

//=================Encrypt=======================

Expand Down

0 comments on commit 3b82350

Please sign in to comment.