summaryrefslogtreecommitdiff
path: root/regress/misc
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-04-03 08:20:28 +0100
committerColin Watson <cjwatson@debian.org>2018-04-03 08:20:28 +0100
commited6ae9c1a014a08ff5db3d768f01f2e427eeb476 (patch)
tree601025e307745d351946c01ab13f419ddb6dae29 /regress/misc
parent62f54f20bf351468e0124f63cc2902ee40d9b0e9 (diff)
parenta0349a1cc4a18967ad1dbff5389bcdf9da098814 (diff)
Import openssh_7.7p1.orig.tar.gz
Diffstat (limited to 'regress/misc')
-rw-r--r--regress/misc/fuzz-harness/sig_fuzz.cc12
-rw-r--r--regress/misc/kexfuzz/Makefile32
-rw-r--r--regress/misc/kexfuzz/README2
3 files changed, 29 insertions, 17 deletions
diff --git a/regress/misc/fuzz-harness/sig_fuzz.cc b/regress/misc/fuzz-harness/sig_fuzz.cc
index 0e535b49a..dd1fda091 100644
--- a/regress/misc/fuzz-harness/sig_fuzz.cc
+++ b/regress/misc/fuzz-harness/sig_fuzz.cc
@@ -37,13 +37,13 @@ int LLVMFuzzerTestOneInput(const uint8_t* sig, size_t slen)
37 static const size_t dlen = strlen(data); 37 static const size_t dlen = strlen(data);
38 38
39#ifdef WITH_OPENSSL 39#ifdef WITH_OPENSSL
40 sshkey_verify(rsa, sig, slen, (const u_char *)data, dlen, 0); 40 sshkey_verify(rsa, sig, slen, (const u_char *)data, dlen, NULL, 0);
41 sshkey_verify(dsa, sig, slen, (const u_char *)data, dlen, 0); 41 sshkey_verify(dsa, sig, slen, (const u_char *)data, dlen, NULL, 0);
42 sshkey_verify(ecdsa256, sig, slen, (const u_char *)data, dlen, 0); 42 sshkey_verify(ecdsa256, sig, slen, (const u_char *)data, dlen, NULL, 0);
43 sshkey_verify(ecdsa384, sig, slen, (const u_char *)data, dlen, 0); 43 sshkey_verify(ecdsa384, sig, slen, (const u_char *)data, dlen, NULL, 0);
44 sshkey_verify(ecdsa521, sig, slen, (const u_char *)data, dlen, 0); 44 sshkey_verify(ecdsa521, sig, slen, (const u_char *)data, dlen, NULL, 0);
45#endif 45#endif
46 sshkey_verify(ed25519, sig, slen, (const u_char *)data, dlen, 0); 46 sshkey_verify(ed25519, sig, slen, (const u_char *)data, dlen, NULL, 0);
47 return 0; 47 return 0;
48} 48}
49 49
diff --git a/regress/misc/kexfuzz/Makefile b/regress/misc/kexfuzz/Makefile
index d0aca8dfe..a7bb6b70d 100644
--- a/regress/misc/kexfuzz/Makefile
+++ b/regress/misc/kexfuzz/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.2 2017/04/17 11:02:31 jsg Exp $ 1# $OpenBSD: Makefile,v 1.3 2017/12/21 05:46:35 djm Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4.include <bsd.obj.mk> 4.include <bsd.obj.mk>
@@ -9,6 +9,25 @@ OPENSSL?= yes
9 9
10PROG= kexfuzz 10PROG= kexfuzz
11SRCS= kexfuzz.c 11SRCS= kexfuzz.c
12
13SSHREL=../../../../../usr.bin/ssh
14.PATH: ${.CURDIR}/${SSHREL}
15# From usr.bin/ssh
16SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
17SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
18SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
19SRCS+=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
21SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c
22SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c
23SRCS+=dh.c compat.c
24SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
25SRCS+=cipher-chachapoly.c chacha.c poly1305.c
26SRCS+=smult_curve25519_ref.c
27
28SRCS+=digest-openssl.c
29#SRCS+=digest-libc.c
30
12NOMAN= 1 31NOMAN= 1
13 32
14.if (${OPENSSL:L} == "yes") 33.if (${OPENSSL:L} == "yes")
@@ -49,23 +68,14 @@ CDIAGFLAGS+= -Wswitch
49CDIAGFLAGS+= -Wtrigraphs 68CDIAGFLAGS+= -Wtrigraphs
50CDIAGFLAGS+= -Wuninitialized 69CDIAGFLAGS+= -Wuninitialized
51CDIAGFLAGS+= -Wunused 70CDIAGFLAGS+= -Wunused
71CDIAGFLAGS+= -Wno-unused-parameter
52.if ${COMPILER_VERSION:L} != "gcc3" 72.if ${COMPILER_VERSION:L} != "gcc3"
53CDIAGFLAGS+= -Wpointer-sign
54CDIAGFLAGS+= -Wold-style-definition 73CDIAGFLAGS+= -Wold-style-definition
55.endif 74.endif
56 75
57SSHREL=../../../../../usr.bin/ssh
58 76
59CFLAGS+=-I${.CURDIR}/${SSHREL} 77CFLAGS+=-I${.CURDIR}/${SSHREL}
60 78
61.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir})
62LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh
63DPADD+=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a
64.else
65LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh
66DPADD+=${.CURDIR}/${SSHREL}/lib/libssh.a
67.endif
68
69LDADD+= -lutil -lz 79LDADD+= -lutil -lz
70DPADD+= ${LIBUTIL} ${LIBZ} 80DPADD+= ${LIBUTIL} ${LIBZ}
71 81
diff --git a/regress/misc/kexfuzz/README b/regress/misc/kexfuzz/README
index abd7b50ee..504c26f3b 100644
--- a/regress/misc/kexfuzz/README
+++ b/regress/misc/kexfuzz/README
@@ -30,3 +30,5 @@ Limitations: kexfuzz can't change the ordering of packets at
30present. It is limited to replacing individual packets with 30present. It is limited to replacing individual packets with
31fuzzed variants with the same type. It really should allow 31fuzzed variants with the same type. It really should allow
32insertion, deletion on replacement of packets too. 32insertion, deletion on replacement of packets too.
33
34$OpenBSD: README,v 1.3 2017/10/20 02:13:41 djm Exp $