Fix build and disable dhtest for sntrup761x25519. The test assumes a
authortobhe <tobhe@openbsd.org>
Fri, 28 May 2021 21:09:01 +0000 (21:09 +0000)
committertobhe <tobhe@openbsd.org>
Fri, 28 May 2021 21:09:01 +0000 (21:09 +0000)
symmetric KE and does not work with this method.

regress/sbin/iked/dh/Makefile
regress/sbin/iked/dh/dhtest.c

index 625a27d..77899a8 100644 (file)
@@ -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}
index 6a3f0cb..852ca8f 100644 (file)
@@ -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);