summaryrefslogtreecommitdiff
path: root/regress/sbin/iked
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2014-08-27 10:28:58 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2014-08-27 10:28:58 +0000
commitde135b03c4a9b86cdca2b20fdc47c93762fc0f14 (patch)
treec28a4ce901b1d6115929e526b74fbb5d9d3df7f8 /regress/sbin/iked
parente24502a8af269f5e72783970e3076a80e75084b2 (diff)
Add support for Curve25519 using the public domain code that is found
in OpenSSH. The "private use" DH group 1034 is based on the value that was picked by strongswan recently. OK mikeb@ markus@
Diffstat (limited to 'regress/sbin/iked')
-rw-r--r--regress/sbin/iked/dh/Makefile4
-rw-r--r--regress/sbin/iked/dh/dhtest.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/regress/sbin/iked/dh/Makefile b/regress/sbin/iked/dh/Makefile
index ca0ed80526b..7837109dda5 100644
--- a/regress/sbin/iked/dh/Makefile
+++ b/regress/sbin/iked/dh/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.1 2014/08/25 19:22:20 reyk Exp $
+# $OpenBSD: Makefile,v 1.2 2014/08/27 10:28:57 reyk Exp $
# Test DH:
PROG= dhtest
-SRCS= dh.c dhtest.c
+SRCS= dh.c dhtest.c smult_curve25519_ref.c
TOPSRC= ${.CURDIR}/../../../../sbin/iked
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
.PATH: ${TOPSRC} ${TOPOBJ}
diff --git a/regress/sbin/iked/dh/dhtest.c b/regress/sbin/iked/dh/dhtest.c
index f5100dc096f..575109eb7b8 100644
--- a/regress/sbin/iked/dh/dhtest.c
+++ b/regress/sbin/iked/dh/dhtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhtest.c,v 1.1 2014/08/25 19:22:20 reyk Exp $ */
+/* $OpenBSD: dhtest.c,v 1.2 2014/08/27 10:28:57 reyk Exp $ */
/* $EOM: dhtest.c,v 1.1 1998/07/18 21:14:20 provos Exp $ */
/*
@@ -47,21 +47,21 @@ main(void)
char buf[DH_MAXSZ], buf2[DH_MAXSZ];
char sec[DH_MAXSZ], sec2[DH_MAXSZ];
struct group *group, *group2;
- const char *name[] = { "MODP", "EC2N", "ECP" };
+ const char *name[] = { "MODP", "EC2N", "ECP", "CURVE25519" };
group_init();
- for (id = 0; id < 0xff; id++) {
+ for (id = 0; id < 0xffff; id++) {
if ((group = group_get(id)) == NULL ||
(group2 = group_get(id)) == NULL)
continue;
- printf ("Testing group %d (%s%d): ", id,
- name[group->spec->type],
- group->spec->bits);
-
len = dh_getlen(group);
+ printf ("Testing group %d (%s-%d, length %d): ", id,
+ name[group->spec->type],
+ group->spec->bits, len * 8);
+
dh_create_exchange(group, buf);
dh_create_exchange(group2, buf2);