Commit dc214c3a authored by Niels Möller's avatar Niels Möller

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

parent 24f3cce7
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.
* testsuite/pbkdf2-test.c: Use it.
......
#include "testutils.h"
#include "nettle-internal.h"
#include "nettle-meta.h"
const char* hashes[] = {
......@@ -29,5 +30,7 @@ test_main(void)
while (NULL != nettle_hashes[j])
j++;
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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment