summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-08 16:19:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-08 16:19:00 +0000
commit7933e2ebd7ac6fc6855ba220fa9d1233edc74ccd (patch)
tree5fde110ac8703c670bdc41c962f9079cefc04257 /sbin/isakmpd
parentf58841cc741324aa9089d13e0a7d054775f3b76e (diff)
kill USE_EC
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/math_group.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/sbin/isakmpd/math_group.c b/sbin/isakmpd/math_group.c
index 55f340f58cf..aeb8f708905 100644
--- a/sbin/isakmpd/math_group.c
+++ b/sbin/isakmpd/math_group.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: math_group.c,v 1.23 2004/06/14 09:55:41 ho Exp $ */
+/* $OpenBSD: math_group.c,v 1.24 2005/04/08 16:18:59 deraadt Exp $ */
/* $EOM: math_group.c,v 1.25 2000/04/07 19:53:26 niklas Exp $ */
/*
@@ -271,7 +271,6 @@ struct modp_dscr oakley_modp[] =
},
};
-#ifdef USE_EC
/* Describe preconfigured EC2N groups */
/*
@@ -292,7 +291,6 @@ struct ec2n_dscr oakley_ec2n[] = {
"0x00",
"0x1ee9" },
};
-#endif /* USE_EC */
/* XXX I want to get rid of the casting here. */
struct group groups[] = {
@@ -312,7 +310,6 @@ struct group groups[] = {
(int (*) (struct group *, void *)) modp_setrandom,
(int (*) (struct group *, void *, void *, void *)) modp_operation
},
-#ifdef USE_EC
{
EC2N, OAKLEY_GRP_3, 0, &oakley_ec2n[0], 0, 0, 0, 0, 0,
(int (*) (struct group *)) ec2n_getlen,
@@ -329,7 +326,6 @@ struct group groups[] = {
(int (*) (struct group *, void *)) ec2n_setrandom,
(int (*) (struct group *, void *, void *, void *)) ec2n_operation
},
-#endif /* USE_EC */
{
MODP, OAKLEY_GRP_5, 0, &oakley_modp[2], 0, 0, 0, 0, 0,
(int (*) (struct group *)) modp_getlen,
@@ -338,9 +334,7 @@ struct group groups[] = {
(int (*) (struct group *, void *)) modp_setrandom,
(int (*) (struct group *, void *, void *, void *)) modp_operation
},
-#ifdef USE_EC
/* XXX Higher EC2N group go here... */
-#endif /* USE_EC */
/* XXX group 6 to 13 are not yet defined (draft-ike-ecc) */
{
NOTYET, OAKLEY_GRP_6, 0, NULL, 0, 0, 0, 0, 0,
@@ -428,11 +422,9 @@ group_init(void)
for (i = sizeof(groups) / sizeof(groups[0]) - 1; i >= 0; i--)
switch (groups[i].type) {
-#ifdef USE_EC
case EC2N: /* Initialize an Elliptic Curve over GF(2**n) */
ec2n_init(&groups[i]);
break;
-#endif
case MODP: /* Initialize an over GF(p) */
modp_init(&groups[i]);
@@ -466,11 +458,9 @@ group_get(u_int32_t id)
return 0;
}
switch (clone->type) {
-#ifdef USE_EC
case EC2N:
new = ec2n_clone(new, clone);
break;
-#endif
case MODP:
new = modp_clone(new, clone);
break;
@@ -488,11 +478,9 @@ void
group_free(struct group *grp)
{
switch (grp->type) {
-#ifdef USE_EC
case EC2N:
ec2n_free(grp);
break;
-#endif
case MODP:
modp_free(grp);
break;
@@ -603,7 +591,6 @@ modp_init(struct group *group)
group->group = grp;
}
-#ifdef USE_EC
struct group *
ec2n_clone(struct group *new, struct group *clone)
{
@@ -711,7 +698,6 @@ ec2n_init(struct group *group)
fail:
log_fatal("ec2n_init: general failure");
}
-#endif /* USE_EC */
int
modp_getlen(struct group *group)
@@ -777,7 +763,6 @@ modp_operation(struct group *group, math_mp_t d, math_mp_t a, math_mp_t e)
return 0;
}
-#ifdef USE_EC
int
ec2n_getlen(struct group *group)
{
@@ -862,4 +847,3 @@ ec2n_operation(struct group *grp, ec2np_ptr d, ec2np_ptr a, ec2np_ptr e)
return ec2np_mul(d, a, ex, group->grp);
}
-#endif /* USE_EC */