aboutsummaryrefslogtreecommitdiffstats
path: root/sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1.c')
-rw-r--r--sha1.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sha1.c b/sha1.c
index faeea45..eca40ba 100644
--- a/sha1.c
+++ b/sha1.c
@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
-#define TEST
-#include "common.h"
+#ifdef SUPPORT_SHA1
+# define TEST
+# include "common.h"
static struct testcase testcases[] = {
@@ -14,11 +15,11 @@ static struct testcase testcases[] = {
{1, 0, "abc", "a9993e364706816aba3e25717850c26c9cd0d89d"},
{1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
"84983e441c3bd26ebaae4aa1f95129e5e54670f1"},
-#ifdef MASSIVE_TESTS
+# ifdef MASSIVE_TESTS
{0x20000000UL, 0, "A", "df3f26fce8fa7bec2c61d0506749a320ac7dc942"},
{0x41000000UL, 8, "\0", "320c617b0b6ee1b6f9c3271eae135f40cae22c10"},
{0x6000003FUL, 0, "\x84", "b20aa99b62e6a480fd93b4d24b2c19ffac649bb8"},
-#endif
+# endif
{1000000UL, 8, "\0", "bef3595266a65a2ff36b700a75e8ed95c68210b6"},
{0, 1, "\x00", "bb6b3e18f0115b57925241676f5b1ae88747b08a"},
{0, 2, "\x01", "ec6b39952e1a3ec3ab3507185cf756181c84bbe2"},
@@ -30,6 +31,12 @@ static struct testcase testcases[] = {
};
+#else
+# define TEST_UNSUPPORTED
+# include "common.h"
+#endif
+
+
int
main(void)
{