diff --git a/src/protocols/secure_channel/tests/TestCheckinMsg.cpp b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp index 71750e9a8fa4d9..806ad1a11b979d 100644 --- a/src/protocols/secure_channel/tests/TestCheckinMsg.cpp +++ b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp @@ -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);