From 27e8f6a528a286f8aa8375f7c85043afe21fb2c4 Mon Sep 17 00:00:00 2001 From: tobhe Date: Fri, 28 May 2021 21:09:02 +0000 Subject: Fix build and disable dhtest for sntrup761x25519. The test assumes a symmetric KE and does not work with this method. --- regress/sbin/iked/dh/Makefile | 3 ++- regress/sbin/iked/dh/dhtest.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/regress/sbin/iked/dh/Makefile b/regress/sbin/iked/dh/Makefile index 625a27d0136..77899a8b699 100644 --- a/regress/sbin/iked/dh/Makefile +++ b/regress/sbin/iked/dh/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 2020/11/03 20:45:58 tobhe Exp $ +# $OpenBSD: Makefile,v 1.4 2021/05/28 21:09:01 tobhe Exp $ # Test DH: PROG= dhtest SRCS= dh.c dhtest.c smult_curve25519_ref.c imsg_util.c +SRCS+= sntrup761.c crypto_hash.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 6a3f0cbd73e..852ca8fd814 100644 --- a/regress/sbin/iked/dh/dhtest.c +++ b/regress/sbin/iked/dh/dhtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhtest.c,v 1.4 2021/02/04 20:45:13 tobhe Exp $ */ +/* $OpenBSD: dhtest.c,v 1.5 2021/05/28 21:09:01 tobhe Exp $ */ /* $EOM: dhtest.c,v 1.1 1998/07/18 21:14:20 provos Exp $ */ /* @@ -62,8 +62,9 @@ main(void) group_init(); for (id = 0; id < 0xffff; id++) { - if ((group = group_get(id)) == NULL || - (group2 = group_get(id)) == NULL) + if (((group = group_get(id)) == NULL || + (group2 = group_get(id)) == NULL) || + group->spec->type == GROUP_SNTRUP761X25519) continue; dh_create_exchange(group, &buf, NULL); -- cgit v1.2.3