Skip to content

Commit

Permalink
Fix OpenIotSDK failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Aug 30, 2023
1 parent 510faf1 commit 0c4f754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CheckinMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ CHIP_ERROR CheckinMessage::ParseCheckinMessagePayload(Crypto::Aes128KeyHandle &
VerifyOrReturnError(payload.size() >= sMinPayloadSize, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(payload.size() <= (sMinPayloadSize + sMaxAppDataSize), CHIP_ERROR_INVALID_ARGUMENT);

CHIP_ERROR err = CHIP_NO_ERROR;
CHIP_ERROR err = CHIP_NO_ERROR;
size_t appDataSize = GetAppDataSize(payload);

// To prevent workbuffer usage, appData size needs to be large enough to hold both the appData and the counter
Expand Down
4 changes: 4 additions & 0 deletions src/protocols/secure_channel/tests/TestCheckinMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ void TestCheckin_Generate(nlTestSuite * inSuite, void * inContext)
// caller to make sure the key is indeed valid.
Aes128KeyHandle emptyKeyHandle;
err = CheckinMessage::GenerateCheckinMessagePayload(emptyKeyHandle, counter, userData, outputBuffer);
#if CHIP_CRYPTO_PSA
NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR != err));
#else
NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err));
#endif

ByteSpan emptyData;
err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, emptyData, outputBuffer);
Expand Down

0 comments on commit 0c4f754

Please sign in to comment.