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

« back to all changes in this revision

Viewing changes to testsuite/sexp2rsa-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:
1
1
#include "testutils.h"
2
2
 
3
 
int
 
3
void
4
4
test_main(void)
5
5
{
6
6
  struct rsa_public_key pub;
7
7
  struct rsa_private_key priv;
8
 
  
 
8
  const struct tstring *sexp;
 
9
 
9
10
  rsa_public_key_init(&pub);
10
11
  rsa_private_key_init(&priv);
11
12
 
 
13
  sexp = SHEX("2831313a707269766174652d6b657928"
 
14
                "333a72736128313a6e36333a085c3408"
 
15
                "989acae4faec3cbbad91c90d34c1d259"
 
16
                "cd74121a36f38b0b51424a9b2be514a0"
 
17
                "4377113a6cdafe79dd7d5f2ecc8b5e96"
 
18
                "61189b86a7b22239907c252928313a65"
 
19
                "343a36ad4b1d2928313a6436333a06ee"
 
20
                "6d4ff3c239e408150daf8117abfa36a4"
 
21
                "0ad4455d9059a86d52f33a2de07418a0"
 
22
                "a699594588c64810248c9412d554f74a"
 
23
                "f947c73c32007e87c92f0937ed292831"
 
24
                "3a7033323a03259879b24315e9cf1425"
 
25
                "4824c7935d807cdb6990f414a0f65e60"
 
26
                "65130a611f2928313a7133323a02a81b"
 
27
                "a73bad45fc73b36deffce52d1b73e074"
 
28
                "7f4d8a82648cecd310448ea63b292831"
 
29
                "3a6133323a026cbdad5dd0046e093f06"
 
30
                "0ecd5b4ac918e098b0278bb752b7cadd"
 
31
                "6a8944f0b92928313a6233323a014875"
 
32
                "1e622d6d58e3bb094afd6edacf737035"
 
33
                "1d068e2ce9f565c5528c4a7473292831"
 
34
                "3a6333323a00f8a458ea73a018dc6fa5"
 
35
                "6863e3bc6de405f364f77dee6f096267"
 
36
              "9ea1a8282e292929");
12
37
  ASSERT(rsa_keypair_from_sexp
13
 
         (&pub, &priv, 0,
14
 
          HL("2831313a707269766174652d6b657928"
15
 
             "333a72736128313a6e36333a085c3408"
16
 
             "989acae4faec3cbbad91c90d34c1d259"
17
 
             "cd74121a36f38b0b51424a9b2be514a0"
18
 
             "4377113a6cdafe79dd7d5f2ecc8b5e96"
19
 
             "61189b86a7b22239907c252928313a65"
20
 
             "343a36ad4b1d2928313a6436333a06ee"
21
 
             "6d4ff3c239e408150daf8117abfa36a4"
22
 
             "0ad4455d9059a86d52f33a2de07418a0"
23
 
             "a699594588c64810248c9412d554f74a"
24
 
             "f947c73c32007e87c92f0937ed292831"
25
 
             "3a7033323a03259879b24315e9cf1425"
26
 
             "4824c7935d807cdb6990f414a0f65e60"
27
 
             "65130a611f2928313a7133323a02a81b"
28
 
             "a73bad45fc73b36deffce52d1b73e074"
29
 
             "7f4d8a82648cecd310448ea63b292831"
30
 
             "3a6133323a026cbdad5dd0046e093f06"
31
 
             "0ecd5b4ac918e098b0278bb752b7cadd"
32
 
             "6a8944f0b92928313a6233323a014875"
33
 
             "1e622d6d58e3bb094afd6edacf737035"
34
 
             "1d068e2ce9f565c5528c4a7473292831"
35
 
             "3a6333323a00f8a458ea73a018dc6fa5"
36
 
             "6863e3bc6de405f364f77dee6f096267"
37
 
             "9ea1a8282e292929")));
 
38
         (&pub, &priv, 0, sexp->length, sexp->data));
38
39
 
39
40
  test_rsa_key(&pub, &priv);
40
41
 
41
42
  rsa_public_key_clear(&pub);
42
43
  rsa_private_key_clear(&priv);
43
 
  
44
 
  SUCCESS();
45
44
}
46
45