summaryrefslogtreecommitdiff
path: root/sntp/tests/packetProcessing.c
diff options
context:
space:
mode:
Diffstat (limited to 'sntp/tests/packetProcessing.c')
-rw-r--r--sntp/tests/packetProcessing.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sntp/tests/packetProcessing.c b/sntp/tests/packetProcessing.c
index 910c561721c3..9c9f061c4aee 100644
--- a/sntp/tests/packetProcessing.c
+++ b/sntp/tests/packetProcessing.c
@@ -464,6 +464,8 @@ test_CorrectAuthenticatedPacketSHA1(void)
void
test_CorrectAuthenticatedPacketCMAC(void)
{
+#if defined(OPENSSL) && defined(ENABLE_CMAC)
+
PrepareAuthenticationTest(30, CMAC_LENGTH, CMAC, "abcdefghijklmnop");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
@@ -480,5 +482,11 @@ test_CorrectAuthenticatedPacketCMAC(void)
TEST_ASSERT_EQUAL(pkt_len,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL CMAC not used, skipping...");
+
+#endif /* OPENSSL */
}