~ubuntu-branches/ubuntu/utopic/nettle/utopic

« back to all changes in this revision

Viewing changes to testsuite/dsa-keygen-test.c

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-07 22:57:14 UTC
  • mfrom: (8.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130507225714-s331yr8ov53dtt17
Tags: 2.7-2
Tag some (ECC related) symbols that only exist on some architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
  fputc(c, stderr);
9
9
}
10
10
 
11
 
int
 
11
void
12
12
test_main(void)
13
13
{
14
14
  struct dsa_public_key pub;
21
21
 
22
22
  knuth_lfib_init(&lfib, 13);
23
23
 
24
 
  if (!dsa_generate_keypair(&pub, &key,
25
 
                            &lfib, (nettle_random_func *) knuth_lfib_random,
26
 
                            NULL, verbose ? progress : NULL,
27
 
                            1024, 160))
28
 
    FAIL();
 
24
  ASSERT (dsa_generate_keypair(&pub, &key,
 
25
                               &lfib,
 
26
                               (nettle_random_func *) knuth_lfib_random,
 
27
                               NULL, verbose ? progress : NULL,
 
28
                               1024, 160));
29
29
 
30
30
  test_dsa_key(&pub, &key, 160);
31
31
  test_dsa160(&pub, &key, NULL);
32
32
 
33
 
  if (!dsa_generate_keypair(&pub, &key,
34
 
                            &lfib, (nettle_random_func *) knuth_lfib_random,
35
 
                            NULL, verbose ? progress : NULL,
36
 
                            2048, 256))
37
 
    FAIL();
 
33
  ASSERT (dsa_generate_keypair(&pub, &key,
 
34
                               &lfib,
 
35
                               (nettle_random_func *) knuth_lfib_random,
 
36
                               NULL, verbose ? progress : NULL,
 
37
                               2048, 256));
38
38
 
39
39
  test_dsa_key(&pub, &key, 256);
40
40
  test_dsa256(&pub, &key, NULL);
41
41
  
42
42
  dsa_public_key_clear(&pub);
43
43
  dsa_private_key_clear(&key);
44
 
  
45
 
  SUCCESS();
46
44
}