summaryrefslogtreecommitdiff
path: root/regress/misc/kexfuzz
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-02-21 11:57:14 +0000
committerColin Watson <cjwatson@debian.org>2020-02-21 14:27:02 +0000
commit886e47e745586c34e81cfd5c5fb9b5dbc8e84d04 (patch)
treedd6c3b4dc64a17c520af7aaf213163f8a0a63e56 /regress/misc/kexfuzz
parentac2b4c0697fcac554041ab95f81736887eadf6ec (diff)
parenta2dabf35ce0228c86a288d11cc847a9d9801604f (diff)
New upstream release (8.2p1)
Diffstat (limited to 'regress/misc/kexfuzz')
-rw-r--r--regress/misc/kexfuzz/Makefile6
-rw-r--r--regress/misc/kexfuzz/kexfuzz.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/regress/misc/kexfuzz/Makefile b/regress/misc/kexfuzz/Makefile
index 20802cb87..9eb86931c 100644
--- a/regress/misc/kexfuzz/Makefile
+++ b/regress/misc/kexfuzz/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.4 2019/01/21 12:50:12 djm Exp $ 1# $OpenBSD: Makefile,v 1.7 2020/01/26 00:09:50 djm Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4.include <bsd.obj.mk> 4.include <bsd.obj.mk>
@@ -20,6 +20,7 @@ SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
20SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c 20SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
21SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c 21SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
22SRCS+=cipher-chachapoly.c chacha.c poly1305.c 22SRCS+=cipher-chachapoly.c chacha.c poly1305.c
23SRCS+=sshbuf-io.c ssh-ecdsa-sk.c ssh-ed25519-sk.c msg.c ssh-sk-client.c
23 24
24SRCS+= kex.c 25SRCS+= kex.c
25SRCS+= dh.c 26SRCS+= dh.c
@@ -50,6 +51,9 @@ SSH1= no
50CFLAGS+= -DWITH_SSH1 51CFLAGS+= -DWITH_SSH1
51.endif 52.endif
52 53
54LDADD+= -lfido2 -lcbor -lusbhid
55DPADD+= ${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID}
56
53# enable warnings 57# enable warnings
54WARNINGS=Yes 58WARNINGS=Yes
55 59
diff --git a/regress/misc/kexfuzz/kexfuzz.c b/regress/misc/kexfuzz/kexfuzz.c
index 7051e87b1..56697c918 100644
--- a/regress/misc/kexfuzz/kexfuzz.c
+++ b/regress/misc/kexfuzz/kexfuzz.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexfuzz.c,v 1.5 2019/01/21 12:50:12 djm Exp $ */ 1/* $OpenBSD: kexfuzz.c,v 1.6 2020/01/26 00:09:50 djm Exp $ */
2/* 2/*
3 * Fuzz harness for KEX code 3 * Fuzz harness for KEX code
4 * 4 *
@@ -424,12 +424,8 @@ main(int argc, char **argv)
424 if (packet_index == -1 || direction == -1 || data_path == NULL) 424 if (packet_index == -1 || direction == -1 || data_path == NULL)
425 badusage("Replace (-r) mode must specify direction " 425 badusage("Replace (-r) mode must specify direction "
426 "(-D) packet index (-i) and data path (-f)"); 426 "(-D) packet index (-i) and data path (-f)");
427 if ((fd = open(data_path, O_RDONLY)) == -1) 427 if ((r = sshbuf_load_file(data_path, &replace_data)) != 0)
428 err(1, "open %s", data_path);
429 replace_data = sshbuf_new();
430 if ((r = sshkey_load_file(fd, replace_data)) != 0)
431 errx(1, "read %s: %s", data_path, ssh_err(r)); 428 errx(1, "read %s: %s", data_path, ssh_err(r));
432 close(fd);
433 } 429 }
434 430
435 /* Dump mode */ 431 /* Dump mode */