Mercurial > dropbear
comparison Makefile.in @ 1741:d1b279aa5ed1 fuzz
Get client fuzzer building and starting (fails straight away)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 18 Oct 2020 12:17:39 +0800 |
parents | 72bb7fb1fced |
children | 6e71440b1e47 |
comparison
equal
deleted
inserted
replaced
1740:dfbe947bdf0d | 1741:d1b279aa5ed1 |
---|---|
266 cd $(srcdir); ./dropbear_lint.sh | 266 cd $(srcdir); ./dropbear_lint.sh |
267 | 267 |
268 ## Fuzzing targets | 268 ## Fuzzing targets |
269 | 269 |
270 # list of fuzz targets | 270 # list of fuzz targets |
271 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths fuzzer-kexdh fuzzer-kexecdh fuzzer-kexcurve25519 | 271 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths \ |
272 fuzzer-kexdh fuzzer-kexecdh fuzzer-kexcurve25519 fuzzer-client | |
272 | 273 |
273 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) | 274 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) |
274 | 275 |
275 list-fuzz-targets: | 276 list-fuzz-targets: |
276 @echo $(FUZZ_TARGETS) | 277 @echo $(FUZZ_TARGETS) |
277 | 278 |
278 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs | 279 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs |
279 fuzzstandalone: FUZZLIB=fuzz-harness.o | 280 fuzzstandalone: FUZZLIB=fuzz-harness.o |
280 fuzzstandalone: fuzz-harness.o fuzz-targets | 281 fuzzstandalone: fuzz-harness.o fuzz-targets |
281 | 282 |
282 # exclude svr-main.o to avoid duplicate main | 283 fuzz-harness.o: $(HEADERS) $(LIBTOM_DEPS) Makefile $(allobjs) fuzz-common.o |
283 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) | |
284 | |
285 fuzz-harness.o: $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) fuzz-common.o | |
286 | 284 |
287 # build all the fuzzers. This will require fail to link unless built with | 285 # build all the fuzzers. This will require fail to link unless built with |
288 # make fuzz-targets FUZZLIB=-lFuzzer.a | 286 # make fuzz-targets FUZZLIB=-lFuzzer.a |
289 # or similar - the library provides main(). | 287 # or similar - the library provides main(). |
290 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) | 288 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) |
291 | 289 |
292 fuzzer-preauth: fuzzer-preauth.o fuzz-harness.o | 290 fuzzer-preauth: fuzzer-preauth.o fuzz-harness.o |
293 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 291 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
294 | 292 |
295 fuzzer-preauth_nomaths: fuzzer-preauth_nomaths.o fuzz-harness.o | 293 fuzzer-preauth_nomaths: fuzzer-preauth_nomaths.o fuzz-harness.o |
296 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 294 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
297 | 295 |
298 fuzzer-pubkey: fuzzer-pubkey.o fuzz-harness.o | 296 fuzzer-pubkey: fuzzer-pubkey.o fuzz-harness.o |
299 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 297 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
300 | 298 |
301 fuzzer-verify: fuzzer-verify.o fuzz-harness.o | 299 fuzzer-verify: fuzzer-verify.o fuzz-harness.o |
302 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 300 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
303 | 301 |
304 fuzzer-kexdh: fuzzer-kexdh.o fuzz-harness.o | 302 fuzzer-kexdh: fuzzer-kexdh.o fuzz-harness.o |
305 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 303 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
306 | 304 |
307 fuzzer-kexecdh: fuzzer-kexecdh.o fuzz-harness.o | 305 fuzzer-kexecdh: fuzzer-kexecdh.o fuzz-harness.o |
308 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 306 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
309 | 307 |
310 fuzzer-kexcurve25519: fuzzer-kexcurve25519.o fuzz-harness.o | 308 fuzzer-kexcurve25519: fuzzer-kexcurve25519.o fuzz-harness.o |
311 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 309 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
310 | |
311 fuzzer-client: fuzzer-client.o fuzz-harness.o | |
312 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | |
312 | 313 |
313 fuzzer-%.options: Makefile | 314 fuzzer-%.options: Makefile |
314 echo "[libfuzzer]" > $@ | 315 echo "[libfuzzer]" > $@ |
315 echo "max_len = 50000" >> $@ | 316 echo "max_len = 50000" >> $@ |
316 | 317 |