~ubuntu-branches/ubuntu/karmic/vpnc/karmic

« back to all changes in this revision

Viewing changes to math_group.c

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2007-12-23 15:42:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20071223154252-jvgomqxzjc8p22ox
Tags: 0.5.1r275-1
* New upstream SVN snapshot with various bugfixes
* A very very very very urgent "fix" from Nicolas Duboc to put cisco-decrypt
  into /usr/lib/vpnc (closes: #454236)

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
/* XXX I want to get rid of the casting here.  */
103
103
static struct group groups[] = {
104
104
        {
105
 
                MODP, OAKLEY_GRP_1, 0, 0, &oakley_modp[0], 0, 0, 0, 0, 0,
106
 
                (int (*)(struct group *))modp_getlen,
107
 
                (void (*)(struct group *, void *, unsigned char *))modp_getraw,
108
 
                (int (*)(struct group *, void *, unsigned char *, int))modp_setraw,
109
 
                (int (*)(struct group *, void *))modp_setrandom,
110
 
                (int (*)(struct group *, void *, void *, void *))modp_operation
111
 
        },
112
 
        {
113
 
                MODP, OAKLEY_GRP_2, 0, 0, &oakley_modp[1], 0, 0, 0, 0, 0,
114
 
                (int (*)(struct group *))modp_getlen,
115
 
                (void (*)(struct group *, void *, unsigned char *))modp_getraw,
116
 
                (int (*)(struct group *, void *, unsigned char *, int))modp_setraw,
117
 
                (int (*)(struct group *, void *))modp_setrandom,
118
 
                (int (*)(struct group *, void *, void *, void *))modp_operation
119
 
        },
120
 
        {
121
 
                MODP, OAKLEY_GRP_5, 0, 0, &oakley_modp[2], 0, 0, 0, 0, 0,
 
105
                MODP, OAKLEY_GRP_1, 0, NULL, &oakley_modp[0], NULL, NULL, NULL, NULL, NULL,
 
106
                (int (*)(struct group *))modp_getlen,
 
107
                (void (*)(struct group *, void *, unsigned char *))modp_getraw,
 
108
                (int (*)(struct group *, void *, unsigned char *, int))modp_setraw,
 
109
                (int (*)(struct group *, void *))modp_setrandom,
 
110
                (int (*)(struct group *, void *, void *, void *))modp_operation
 
111
        },
 
112
        {
 
113
                MODP, OAKLEY_GRP_2, 0, NULL, &oakley_modp[1], NULL, NULL, NULL, NULL, NULL,
 
114
                (int (*)(struct group *))modp_getlen,
 
115
                (void (*)(struct group *, void *, unsigned char *))modp_getraw,
 
116
                (int (*)(struct group *, void *, unsigned char *, int))modp_setraw,
 
117
                (int (*)(struct group *, void *))modp_setrandom,
 
118
                (int (*)(struct group *, void *, void *, void *))modp_operation
 
119
        },
 
120
        {
 
121
                MODP, OAKLEY_GRP_5, 0, NULL, &oakley_modp[2], NULL, NULL, NULL, NULL, NULL,
122
122
                (int (*)(struct group *))modp_getlen,
123
123
                (void (*)(struct group *, void *, unsigned char *))modp_getraw,
124
124
                (int (*)(struct group *, void *, unsigned char *, int))modp_setraw,
166
166
        free(grp);
167
167
}
168
168
 
169
 
struct group *modp_clone(struct group *new, struct group *clone)
 
169
static struct group *modp_clone(struct group *new, struct group *clone)
170
170
{
171
171
        struct modp_group *new_grp, *clone_grp = clone->group;
172
172
 
260
260
{
261
261
        int i;
262
262
 
263
 
        grp = 0; /* unused */
 
263
        grp = NULL; /* unused */
264
264
 
265
265
        gcry_mpi_set_ui(d, 0);
266
266
        for (i = 0; i < l; i++) {