diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-05-13 22:50:54 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-05-13 22:50:54 +0800 |
commit | fb719e3d0ba3571d3abc5638d1fbbe9e1675d6a7 (patch) | |
tree | 7a72eeedf1e3c89258e1e35057f737f1d0176f9c /Makefile.in | |
parent | 9f24cdf74c93aa75416687972e69b5b4c8be2698 (diff) |
fuzz harness
--HG--
branch : fuzz
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index 286e25a..d94f87b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -30,7 +30,7 @@ COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ queue.o \ atomicio.o compat.o fake-rfc2553.o \ ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ - gensignkey.o gendss.o genrsa.o + gensignkey.o gendss.o genrsa.o fuzz-common.o SVROBJS=svr-kex.o svr-auth.o sshpty.o \ svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ @@ -224,8 +224,27 @@ distclean: clean tidy tidy: -rm -f *~ *.gcov */*~ -# run this manually for fuzzing. hostkeys.c is checked in. -hostkeys: +## Fuzzing targets + +# exclude svr-main.o to avoid duplicate main +svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) +CLANG=clang + +# fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs +fuzzstandalone: LIBS+=fuzz-harness.o +fuzzstandalone: fuzz-harness.o fuzzers + +# build all the fuzzers. This will require fail to link unless built with +# make fuzzers LIBS=-lFuzzer.a +# or similar - the library provides main(). +fuzzers: fuzzer-preauth + +fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) + $(CC) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ + +# run this to update hardcoded hostkeys for for fuzzing. +# hostkeys.c is checked in to hg. +fuzz-hostkeys: dropbearkey -t rsa -f keyr dropbearkey -t dss -f keyd dropbearkey -t ecdsa -size 256 -f keye |