Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / testsuite / dsa-keygen-test.c
bloba4db5994dd29c28ab6de8bdaf60d61697347a02a
1 #include "testutils.h"
3 #include "knuth-lfib.h"
5 static void
6 progress(void *ctx UNUSED, int c)
8 fputc(c, stderr);
11 void
12 test_main(void)
14 struct dsa_public_key pub;
15 struct dsa_private_key key;
17 struct knuth_lfib_ctx lfib;
19 dsa_private_key_init(&key);
20 dsa_public_key_init(&pub);
22 knuth_lfib_init(&lfib, 13);
24 ASSERT (dsa_generate_keypair(&pub, &key,
25 &lfib,
26 (nettle_random_func *) knuth_lfib_random,
27 NULL, verbose ? progress : NULL,
28 1024, 160));
30 test_dsa_key(&pub, &key, 160);
31 test_dsa160(&pub, &key, NULL);
33 ASSERT (dsa_generate_keypair(&pub, &key,
34 &lfib,
35 (nettle_random_func *) knuth_lfib_random,
36 NULL, verbose ? progress : NULL,
37 2048, 256));
39 test_dsa_key(&pub, &key, 256);
40 test_dsa256(&pub, &key, NULL);
42 dsa_public_key_clear(&pub);
43 dsa_private_key_clear(&key);