diff options
Diffstat (limited to 'regress/misc/kexfuzz')
-rw-r--r-- | regress/misc/kexfuzz/Makefile | 6 | ||||
-rw-r--r-- | regress/misc/kexfuzz/kexfuzz.c | 8 |
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 | |||
20 | SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c | 20 | SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c |
21 | SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | 21 | SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c |
22 | SRCS+=cipher-chachapoly.c chacha.c poly1305.c | 22 | SRCS+=cipher-chachapoly.c chacha.c poly1305.c |
23 | SRCS+=sshbuf-io.c ssh-ecdsa-sk.c ssh-ed25519-sk.c msg.c ssh-sk-client.c | ||
23 | 24 | ||
24 | SRCS+= kex.c | 25 | SRCS+= kex.c |
25 | SRCS+= dh.c | 26 | SRCS+= dh.c |
@@ -50,6 +51,9 @@ SSH1= no | |||
50 | CFLAGS+= -DWITH_SSH1 | 51 | CFLAGS+= -DWITH_SSH1 |
51 | .endif | 52 | .endif |
52 | 53 | ||
54 | LDADD+= -lfido2 -lcbor -lusbhid | ||
55 | DPADD+= ${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID} | ||
56 | |||
53 | # enable warnings | 57 | # enable warnings |
54 | WARNINGS=Yes | 58 | WARNINGS=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 */ |