2014-03-25 Niels Möller <nisse@lysator.liu.se>
* testsuite/dsa-keygen-test.c (test_main): Do dsa_param cast once,
- and assign to variable.
+ and assign to variable. Test dsa_generate_params and
+ dsa_generate_keypair with a large q; p_bits = 1024, q_bits = 768.
* dsa.h: Deleted old interface (moved to dsa-compat.h).
(struct dsa_value): Deleted. Updated many files.
test_dsa_key(params, pub.y, key.x, 224);
test_dsa256(&pub, &key, NULL);
+
+
+ /* Test with large q */
+ if (!dsa_generate_params (params,
+ &lfib,
+ (nettle_random_func *) knuth_lfib_random,
+ NULL, verbose ? progress : NULL,
+ 1024, 768))
+ FAIL();
+
+ dsa_generate_keypair (params, pub.y, key.x,
+ &lfib,
+ (nettle_random_func *) knuth_lfib_random);
+ test_dsa_key(params, pub.y, key.x, 768);
+ test_dsa256(&pub, &key, NULL);
dsa_public_key_clear(&pub);
dsa_private_key_clear(&key);