diff options
author | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
commit | ed6ae9c1a014a08ff5db3d768f01f2e427eeb476 (patch) | |
tree | 601025e307745d351946c01ab13f419ddb6dae29 /regress/misc | |
parent | 62f54f20bf351468e0124f63cc2902ee40d9b0e9 (diff) | |
parent | a0349a1cc4a18967ad1dbff5389bcdf9da098814 (diff) |
Import openssh_7.7p1.orig.tar.gz
Diffstat (limited to 'regress/misc')
-rw-r--r-- | regress/misc/fuzz-harness/sig_fuzz.cc | 12 | ||||
-rw-r--r-- | regress/misc/kexfuzz/Makefile | 32 | ||||
-rw-r--r-- | regress/misc/kexfuzz/README | 2 |
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 | ||
10 | PROG= kexfuzz | 10 | PROG= kexfuzz |
11 | SRCS= kexfuzz.c | 11 | SRCS= kexfuzz.c |
12 | |||
13 | SSHREL=../../../../../usr.bin/ssh | ||
14 | .PATH: ${.CURDIR}/${SSHREL} | ||
15 | # From usr.bin/ssh | ||
16 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | ||
17 | SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c | ||
18 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | ||
19 | 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 | ||
21 | SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c | ||
22 | SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c | ||
23 | SRCS+=dh.c compat.c | ||
24 | SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | ||
25 | SRCS+=cipher-chachapoly.c chacha.c poly1305.c | ||
26 | SRCS+=smult_curve25519_ref.c | ||
27 | |||
28 | SRCS+=digest-openssl.c | ||
29 | #SRCS+=digest-libc.c | ||
30 | |||
12 | NOMAN= 1 | 31 | NOMAN= 1 |
13 | 32 | ||
14 | .if (${OPENSSL:L} == "yes") | 33 | .if (${OPENSSL:L} == "yes") |
@@ -49,23 +68,14 @@ CDIAGFLAGS+= -Wswitch | |||
49 | CDIAGFLAGS+= -Wtrigraphs | 68 | CDIAGFLAGS+= -Wtrigraphs |
50 | CDIAGFLAGS+= -Wuninitialized | 69 | CDIAGFLAGS+= -Wuninitialized |
51 | CDIAGFLAGS+= -Wunused | 70 | CDIAGFLAGS+= -Wunused |
71 | CDIAGFLAGS+= -Wno-unused-parameter | ||
52 | .if ${COMPILER_VERSION:L} != "gcc3" | 72 | .if ${COMPILER_VERSION:L} != "gcc3" |
53 | CDIAGFLAGS+= -Wpointer-sign | ||
54 | CDIAGFLAGS+= -Wold-style-definition | 73 | CDIAGFLAGS+= -Wold-style-definition |
55 | .endif | 74 | .endif |
56 | 75 | ||
57 | SSHREL=../../../../../usr.bin/ssh | ||
58 | 76 | ||
59 | CFLAGS+=-I${.CURDIR}/${SSHREL} | 77 | CFLAGS+=-I${.CURDIR}/${SSHREL} |
60 | 78 | ||
61 | .if exists(${.CURDIR}/${SSHREL}/lib/${__objdir}) | ||
62 | LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh | ||
63 | DPADD+=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a | ||
64 | .else | ||
65 | LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh | ||
66 | DPADD+=${.CURDIR}/${SSHREL}/lib/libssh.a | ||
67 | .endif | ||
68 | |||
69 | LDADD+= -lutil -lz | 79 | LDADD+= -lutil -lz |
70 | DPADD+= ${LIBUTIL} ${LIBZ} | 80 | DPADD+= ${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 | |||
30 | present. It is limited to replacing individual packets with | 30 | present. It is limited to replacing individual packets with |
31 | fuzzed variants with the same type. It really should allow | 31 | fuzzed variants with the same type. It really should allow |
32 | insertion, deletion on replacement of packets too. | 32 | insertion, deletion on replacement of packets too. |
33 | |||
34 | $OpenBSD: README,v 1.3 2017/10/20 02:13:41 djm Exp $ | ||