From: tobhe Date: Fri, 28 May 2021 21:09:01 +0000 (+0000) Subject: Fix build and disable dhtest for sntrup761x25519. The test assumes a X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d54abb9d690576de9c48c8984482acf8ba43eaee;p=openbsd Fix build and disable dhtest for sntrup761x25519. The test assumes a symmetric KE and does not work with this method. --- 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);