~ubuntu-branches/ubuntu/precise/nss/precise-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/freebl/mpi/test-info.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-11-14 14:58:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131114145807-ay302kimn72ovt88
Tags: 3.15.3-0ubuntu0.12.04.1
* SECURITY UPDATE: New upstream release to fix multiple security issues
  and add TLSv1.2 support.
  - CVE-2013-1739
  - CVE-2013-1741
  - CVE-2013-5605
  - CVE-2013-5606
* Adjusted packaging for 3.15.3:
  - debian/patches/*: refreshed.
  - debian/patches/lower-dhe-priority.patch: removed, no longer needed,
    was a workaround for an old version of firefox.
  - debian/libnss3.symbols: added new symbols.
  - debian/rules: updated for new source layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  test-info.c
3
 
 *
4
 
 *  Arbitrary precision integer arithmetic library
5
 
 *
6
 
 * This Source Code Form is subject to the terms of the Mozilla Public
7
 
 * License, v. 2.0. If a copy of the MPL was not distributed with this
8
 
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9
 
/* $Id: test-info.c,v 1.4 2012/04/25 14:49:50 gerv%gerv.net Exp $ */
10
 
 
11
 
/* Table mapping test suite names to index numbers */
12
 
const int   g_count = 42;
13
 
const char *g_names[] = {
14
 
   "list",              /* print out a list of the available test suites */
15
 
   "copy",              /* test assignment of mp-int structures          */
16
 
   "exchange",          /* test exchange of mp-int structures            */
17
 
   "zero",              /* test zeroing of an mp-int                     */
18
 
   "set",               /* test setting an mp-int to a small constant    */
19
 
   "absolute-value",    /* test the absolute value function              */
20
 
   "negate",            /* test the arithmetic negation function         */
21
 
   "add-digit",         /* test digit addition                           */
22
 
   "add",               /* test full addition                            */
23
 
   "subtract-digit",    /* test digit subtraction                        */
24
 
   "subtract",          /* test full subtraction                         */
25
 
   "multiply-digit",    /* test digit multiplication                     */
26
 
   "multiply",          /* test full multiplication                      */
27
 
   "square",            /* test full squaring function                   */
28
 
   "divide-digit",      /* test digit division                           */
29
 
   "divide-2",          /* test division by two                          */
30
 
   "divide-2d",         /* test division & remainder by 2^d              */
31
 
   "divide",            /* test full division                            */
32
 
   "expt-digit",        /* test digit exponentiation                     */
33
 
   "expt",              /* test full exponentiation                      */
34
 
   "expt-2",            /* test power-of-two exponentiation              */
35
 
   "square-root",       /* test integer square root function             */
36
 
   "modulo-digit",      /* test digit modular reduction                  */
37
 
   "modulo",            /* test full modular reduction                   */
38
 
   "mod-add",           /* test modular addition                         */
39
 
   "mod-subtract",      /* test modular subtraction                      */
40
 
   "mod-multiply",      /* test modular multiplication                   */
41
 
   "mod-square",        /* test modular squaring function                */
42
 
   "mod-expt",          /* test full modular exponentiation              */
43
 
   "mod-expt-digit",    /* test digit modular exponentiation             */
44
 
   "mod-inverse",       /* test modular inverse function                 */
45
 
   "compare-digit",     /* test digit comparison function                */
46
 
   "compare-zero",      /* test zero comparison function                 */
47
 
   "compare",           /* test general signed comparison                */
48
 
   "compare-magnitude", /* test general magnitude comparison             */
49
 
   "parity",            /* test parity comparison functions              */
50
 
   "gcd",               /* test greatest common divisor functions        */
51
 
   "lcm",               /* test least common multiple function           */
52
 
   "conversion",        /* test general radix conversion facilities      */
53
 
   "binary",            /* test raw output format                        */
54
 
   "pprime",            /* test probabilistic primality tester           */
55
 
   "fermat"             /* test Fermat pseudoprimality tester            */
56
 
};
57
 
 
58
 
/* Test function prototypes */
59
 
int  test_list(void);
60
 
int  test_copy(void);
61
 
int  test_exch(void);
62
 
int  test_zero(void);
63
 
int  test_set(void);
64
 
int  test_abs(void);
65
 
int  test_neg(void);
66
 
int  test_add_d(void);
67
 
int  test_add(void);
68
 
int  test_sub_d(void);
69
 
int  test_sub(void);
70
 
int  test_mul_d(void);
71
 
int  test_mul(void);
72
 
int  test_sqr(void);
73
 
int  test_div_d(void);
74
 
int  test_div_2(void);
75
 
int  test_div_2d(void);
76
 
int  test_div(void);
77
 
int  test_expt_d(void);
78
 
int  test_expt(void);
79
 
int  test_2expt(void);
80
 
int  test_sqrt(void);
81
 
int  test_mod_d(void);
82
 
int  test_mod(void);
83
 
int  test_addmod(void);
84
 
int  test_submod(void);
85
 
int  test_mulmod(void);
86
 
int  test_sqrmod(void);
87
 
int  test_exptmod(void);
88
 
int  test_exptmod_d(void);
89
 
int  test_invmod(void);
90
 
int  test_cmp_d(void);
91
 
int  test_cmp_z(void);
92
 
int  test_cmp(void);
93
 
int  test_cmp_mag(void);
94
 
int  test_parity(void);
95
 
int  test_gcd(void);
96
 
int  test_lcm(void);
97
 
int  test_convert(void);
98
 
int  test_raw(void);
99
 
int  test_pprime(void);
100
 
int  test_fermat(void);
101
 
 
102
 
/* Table mapping index numbers to functions */
103
 
int (*g_tests[])(void)  = {
104
 
   test_list,     test_copy,     test_exch,     test_zero,     
105
 
   test_set,      test_abs,      test_neg,      test_add_d,    
106
 
   test_add,      test_sub_d,    test_sub,      test_mul_d,    
107
 
   test_mul,      test_sqr,      test_div_d,    test_div_2,    
108
 
   test_div_2d,   test_div,      test_expt_d,   test_expt,     
109
 
   test_2expt,    test_sqrt,     test_mod_d,    test_mod,      
110
 
   test_addmod,   test_submod,   test_mulmod,   test_sqrmod,   
111
 
   test_exptmod,  test_exptmod_d, test_invmod,   test_cmp_d,    
112
 
   test_cmp_z,    test_cmp,      test_cmp_mag,  test_parity,   
113
 
   test_gcd,      test_lcm,      test_convert,  test_raw,      
114
 
   test_pprime,   test_fermat
115
 
};
116
 
 
117
 
/* Table mapping index numbers to descriptions */
118
 
const char *g_descs[] = {
119
 
   "print out a list of the available test suites",
120
 
   "test assignment of mp-int structures",
121
 
   "test exchange of mp-int structures",
122
 
   "test zeroing of an mp-int",
123
 
   "test setting an mp-int to a small constant",
124
 
   "test the absolute value function",
125
 
   "test the arithmetic negation function",
126
 
   "test digit addition",
127
 
   "test full addition",
128
 
   "test digit subtraction",
129
 
   "test full subtraction",
130
 
   "test digit multiplication",
131
 
   "test full multiplication",
132
 
   "test full squaring function",
133
 
   "test digit division",
134
 
   "test division by two",
135
 
   "test division & remainder by 2^d",
136
 
   "test full division",
137
 
   "test digit exponentiation",
138
 
   "test full exponentiation",
139
 
   "test power-of-two exponentiation",
140
 
   "test integer square root function",
141
 
   "test digit modular reduction",
142
 
   "test full modular reduction",
143
 
   "test modular addition",
144
 
   "test modular subtraction",
145
 
   "test modular multiplication",
146
 
   "test modular squaring function",
147
 
   "test full modular exponentiation",
148
 
   "test digit modular exponentiation",
149
 
   "test modular inverse function",
150
 
   "test digit comparison function",
151
 
   "test zero comparison function",
152
 
   "test general signed comparison",
153
 
   "test general magnitude comparison",
154
 
   "test parity comparison functions",
155
 
   "test greatest common divisor functions",
156
 
   "test least common multiple function",
157
 
   "test general radix conversion facilities",
158
 
   "test raw output format",
159
 
   "test probabilistic primality tester",
160
 
   "test Fermat pseudoprimality tester"
161
 
};
162