Commit 86b62836 authored by Niels Möller's avatar Niels Möller
Browse files

(test_main): Test dsa256.

Rev: nettle/testsuite/dsa-keygen-test.c:1.4
parent 71f687df
...@@ -19,18 +19,26 @@ test_main(void) ...@@ -19,18 +19,26 @@ test_main(void)
dsa_private_key_init(&key); dsa_private_key_init(&key);
dsa_public_key_init(&pub); dsa_public_key_init(&pub);
/* Generate a 1024 bit key with random e */
knuth_lfib_init(&lfib, 13); knuth_lfib_init(&lfib, 13);
if (!dsa_generate_keypair(&pub, &key, if (!dsa_generate_keypair(&pub, &key,
&lfib, (nettle_random_func *) knuth_lfib_random, &lfib, (nettle_random_func *) knuth_lfib_random,
NULL, verbose ? progress : NULL, NULL, verbose ? progress : NULL,
1024)) 1024, 160))
FAIL(); FAIL();
test_dsa_key(&pub, &key); test_dsa_key(&pub, &key, 160);
test_dsa(&pub, &key); test_dsa160(&pub, &key);
if (!dsa_generate_keypair(&pub, &key,
&lfib, (nettle_random_func *) knuth_lfib_random,
NULL, verbose ? progress : NULL,
2048, 256))
FAIL();
test_dsa_key(&pub, &key, 256);
test_dsa256(&pub, &key);
dsa_public_key_clear(&pub); dsa_public_key_clear(&pub);
dsa_private_key_clear(&key); dsa_private_key_clear(&key);
......
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