Skip to content
Snippets Groups Projects
Commit dc214c3a authored by Niels Möller's avatar Niels Möller
Browse files

testsuite/meta-hash-test.c: Validate NETTLE_MAX_HASH_DIGEST_SIZE.

parent 24f3cce7
No related branches found
No related tags found
No related merge requests found
2012-09-19 Niels Möller <nisse@lysator.liu.se> 2012-09-19 Niels Möller <nisse@lysator.liu.se>
* testsuite/meta-hash-test.c (test_main): Validate
NETTLE_MAX_HASH_DIGEST_SIZE.
* pbkdf2.h (PBKDF2): New macro. * pbkdf2.h (PBKDF2): New macro.
* testsuite/pbkdf2-test.c: Use it. * testsuite/pbkdf2-test.c: Use it.
......
#include "testutils.h" #include "testutils.h"
#include "nettle-internal.h"
#include "nettle-meta.h" #include "nettle-meta.h"
const char* hashes[] = { const char* hashes[] = {
...@@ -29,5 +30,7 @@ test_main(void) ...@@ -29,5 +30,7 @@ test_main(void)
while (NULL != nettle_hashes[j]) while (NULL != nettle_hashes[j])
j++; j++;
ASSERT(j == count); /* we are not missing testing any hashes */ ASSERT(j == count); /* we are not missing testing any hashes */
for (j = 0; NULL != nettle_hashes[j]; j++)
ASSERT(nettle_hashes[j]->digest_size <= NETTLE_MAX_HASH_DIGEST_SIZE);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment