]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Continue AES-128-CMAC test development
authorHarlan Stenn <stenn@ntp.org>
Tue, 28 Nov 2017 08:12:53 +0000 (00:12 -0800)
committerHarlan Stenn <stenn@ntp.org>
Tue, 28 Nov 2017 08:12:53 +0000 (00:12 -0800)
bk: 5a1d1a85kTZBu6x_USku-aWaX5hpiQ

sntp/tests/crypto.c

index 721e357710e64ff6cfea907915dc8711e86ab532..64c784dc74b0a8de18d470ff9a4e8a9b04fa8840 100644 (file)
@@ -21,6 +21,9 @@ void test_VerifyCMAC(void);
 void test_VerifyFailure(void);
 void test_PacketSizeNotMultipleOfFourBytes(void);
 
+void VerifyLocalCMAC(struct key *cmac);
+void VerifyOpenSSLCMAC(struct key *cmac);
+
 
 void
 test_MakeMd5Mac(void)
@@ -180,19 +183,20 @@ test_VerifyCMAC(void)
        memcpy(&cmac.key_seq, "aes-128-cmac-key", cmac.key_len);
        memcpy(&cmac.typen, CMAC, strlen(CMAC) + 1);
 
-       test_VerifyOpenSSLCMAC(&cmac)
-       test_VerifyLocalCMAC(&cmac)
+       VerifyOpenSSLCMAC(&cmac);
+       VerifyLocalCMAC(&cmac);
 }
 
 
 void
-test_VerifyOpenSSLCMAC(struct key *cmac)
+VerifyOpenSSLCMAC(struct key *cmac)
 {
 #ifdef OPENSSL
 
        /* XXX: HMS: auth_md5 must be renamed/incorrect. */
-       TEST_ASSERT_TRUE(auth_md5(PKT_DATA, PKT_LEN, CMAC_LENGTH, cmac));
-       
+       // TEST_ASSERT_TRUE(auth_md5(PKT_DATA, PKT_LEN, CMAC_LENGTH, cmac));
+       TEST_IGNORE_MESSAGE("VerifyOpenSSLCMAC needs to be implemented, skipping...");
+
 #else
        
        TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
@@ -203,7 +207,7 @@ test_VerifyOpenSSLCMAC(struct key *cmac)
 
 
 void
-test_VerifyLocalCMAC(struct key *cmac)
+VerifyLocalCMAC(struct key *cmac)
 {
 
        /* XXX: HMS: auth_md5 must be renamed/incorrect. */