summaryrefslogtreecommitdiff
path: root/crypt
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-20 20:00:20 +0000
committerJakub Jelinek <jakub@redhat.com>2009-03-20 20:00:20 +0000
commitef860a878bf532436a469fc1f89fe3366862a949 (patch)
treec4a2666ac77cdaa00f41bd8f66a828b39e2642ff /crypt
parentd4c583b4466962a9d9d4ca54ab6108dc7b42cdcc (diff)
Updated to fedora-glibc-20090320T1944cvs/fedora-glibc-2_9_90-11
Diffstat (limited to 'crypt')
-rw-r--r--crypt/sha256test.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/crypt/sha256test.c b/crypt/sha256test.c
index b13a3c511e..39e80307c7 100644
--- a/crypt/sha256test.c
+++ b/crypt/sha256test.c
@@ -84,7 +84,17 @@ main (void)
"\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0";
if (memcmp (expected, sum, 32) != 0)
{
- printf ("test %d failed\n", cnt);
+ printf ("test %d failed\n", cnt++);
+ result = 1;
+ }
+
+ __sha256_init_ctx (&ctx);
+ for (int i = 0; i < 100000; ++i)
+ __sha256_process_bytes (buf, 10, &ctx);
+ __sha256_finish_ctx (&ctx, sum);
+ if (memcmp (expected, sum, 32) != 0)
+ {
+ printf ("test %d failed\n", cnt++);
result = 1;
}