Mercurial > dropbear
comparison Makefile.in @ 1348:5c2899e35b63 fuzz
fuzz harness
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 13 May 2017 22:50:54 +0800 |
parents | b28624698130 |
children | 68e0e396af80 |
comparison
equal
deleted
inserted
replaced
1347:b28624698130 | 1348:5c2899e35b63 |
---|---|
28 dss.o bignum.o \ | 28 dss.o bignum.o \ |
29 signkey.o rsa.o dbrandom.o \ | 29 signkey.o rsa.o dbrandom.o \ |
30 queue.o \ | 30 queue.o \ |
31 atomicio.o compat.o fake-rfc2553.o \ | 31 atomicio.o compat.o fake-rfc2553.o \ |
32 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ | 32 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ |
33 gensignkey.o gendss.o genrsa.o | 33 gensignkey.o gendss.o genrsa.o fuzz-common.o |
34 | 34 |
35 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ | 35 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ |
36 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ | 36 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ |
37 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ | 37 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ |
38 svr-tcpfwd.o svr-authpam.o | 38 svr-tcpfwd.o svr-authpam.o |
222 -rm -f Makefile | 222 -rm -f Makefile |
223 | 223 |
224 tidy: | 224 tidy: |
225 -rm -f *~ *.gcov */*~ | 225 -rm -f *~ *.gcov */*~ |
226 | 226 |
227 # run this manually for fuzzing. hostkeys.c is checked in. | 227 ## Fuzzing targets |
228 hostkeys: | 228 |
229 # exclude svr-main.o to avoid duplicate main | |
230 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) | |
231 CLANG=clang | |
232 | |
233 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs | |
234 fuzzstandalone: LIBS+=fuzz-harness.o | |
235 fuzzstandalone: fuzz-harness.o fuzzers | |
236 | |
237 # build all the fuzzers. This will require fail to link unless built with | |
238 # make fuzzers LIBS=-lFuzzer.a | |
239 # or similar - the library provides main(). | |
240 fuzzers: fuzzer-preauth | |
241 | |
242 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | |
243 $(CC) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ | |
244 | |
245 # run this to update hardcoded hostkeys for for fuzzing. | |
246 # hostkeys.c is checked in to hg. | |
247 fuzz-hostkeys: | |
229 dropbearkey -t rsa -f keyr | 248 dropbearkey -t rsa -f keyr |
230 dropbearkey -t dss -f keyd | 249 dropbearkey -t dss -f keyd |
231 dropbearkey -t ecdsa -size 256 -f keye | 250 dropbearkey -t ecdsa -size 256 -f keye |
232 echo > hostkeys.c | 251 echo > hostkeys.c |
233 /usr/bin/xxd -i -a keyr >> hostkeys.c | 252 /usr/bin/xxd -i -a keyr >> hostkeys.c |