hmac-test$(EXEEXT): hmac-test.$(OBJEXT)
$(LINK) hmac-test.$(OBJEXT) $(TEST_OBJS) -o hmac-test$(EXEEXT)
+meta-hash-test$(EXEEXT): meta-hash-test.$(OBJEXT)
+ $(LINK) meta-hash-test.$(OBJEXT) $(TEST_OBJS) -o meta-hash-test$(EXEEXT)
+
+meta-cipher-test$(EXEEXT): meta-cipher-test.$(OBJEXT)
+ $(LINK) meta-cipher-test.$(OBJEXT) $(TEST_OBJS) -o meta-cipher-test$(EXEEXT)
+
+meta-armor-test$(EXEEXT): meta-armor-test.$(OBJEXT)
+ $(LINK) meta-armor-test.$(OBJEXT) $(TEST_OBJS) -o meta-armor-test$(EXEEXT)
+
buffer-test$(EXEEXT): buffer-test.$(OBJEXT)
$(LINK) buffer-test.$(OBJEXT) $(TEST_OBJS) -o buffer-test$(EXEEXT)
serpent-test.c twofish-test.c \
knuth-lfib-test.c \
cbc-test.c ctr-test.c gcm-test.c hmac-test.c \
+ meta-hash-test.c meta-cipher-test.c meta-armor-test.c \
buffer-test.c yarrow-test.c
TS_HOGWEED_SOURCES = sexp-test.c sexp-format-test.c \
--- /dev/null
+#include "testutils.h"
+#include "nettle-meta.h"
+
+const char* armors[] = {
+ "base16",
+ "base64"
+};
+
+int
+test_main(void)
+{
+ int i,j;
+ int count = sizeof(armors)/sizeof(*armors);
+ for (i = 0; i < count; i++) {
+ for (j = 0; NULL != nettle_armors[j]; j++) {
+ if (0 == strcmp(armors[i], nettle_armors[j]->name))
+ break;
+ }
+ ASSERT(NULL != nettle_armors[j]); /* make sure we found a matching armor */
+ }
+ j = 0;
+ while (NULL != nettle_armors[j])
+ j++;
+ ASSERT(j == count); /* we are not missing testing any armors */
+ SUCCESS();
+}
+
--- /dev/null
+#include "testutils.h"
+#include "nettle-meta.h"
+
+const char* ciphers[] = {
+ "aes128",
+ "aes192",
+ "aes256",
+ "arctwo40",
+ "arctwo64",
+ "arctwo128",
+ "arctwo_gutmann128",
+ "arcfour128",
+ "camellia128",
+ "camellia192",
+ "camellia256",
+ "cast128",
+ "serpent128",
+ "serpent192",
+ "serpent256",
+ "twofish128",
+ "twofish192",
+ "twofish256"
+};
+
+int
+test_main(void)
+{
+ int i,j;
+ int count = sizeof(ciphers)/sizeof(*ciphers);
+ for (i = 0; i < count; i++) {
+ for (j = 0; NULL != nettle_ciphers[j]; j++) {
+ if (0 == strcmp(ciphers[i], nettle_ciphers[j]->name))
+ break;
+ }
+ ASSERT(NULL != nettle_ciphers[j]); /* make sure we found a matching cipher */
+ }
+ j = 0;
+ while (NULL != nettle_ciphers[j])
+ j++;
+ ASSERT(j == count); /* we are not missing testing any ciphers */
+ SUCCESS();
+}
+
--- /dev/null
+#include "testutils.h"
+#include "nettle-meta.h"
+
+const char* hashes[] = {
+ "md2",
+ "md4",
+ "md5",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha512"
+};
+
+int
+test_main(void)
+{
+ int i,j;
+ int count = sizeof(hashes)/sizeof(*hashes);
+ for (i = 0; i < count; i++) {
+ for (j = 0; NULL != nettle_hashes[j]; j++) {
+ if (0 == strcmp(hashes[i], nettle_hashes[j]->name))
+ break;
+ }
+ ASSERT(NULL != nettle_hashes[j]); /* make sure we found a matching hash */
+ }
+ j = 0;
+ while (NULL != nettle_hashes[j])
+ j++;
+ ASSERT(j == count); /* we are not missing testing any hashes */
+ SUCCESS();
+}
+