File tree Expand file tree Collapse file tree 4 files changed +21
-128
lines changed Expand file tree Collapse file tree 4 files changed +21
-128
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,24 @@ RUN cd client-testcases/ && curl https://boringssl.googlesource.com/boringssl/+a
3232RUN cp openssl/fuzz/corpora/client/* client-testcases/
3333RUN zip gnutls_client_fuzzer_seed_corpus.zip client-testcases/*
3434
35+ # Applies to servers as well
36+ RUN mkdir server-testcases
37+ RUN cd server-testcases && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/server_corpus.tar.gz | tar -zx
38+ RUN cd server-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/server_corpus_no_fuzzer_mode.tar.gz | tar -zx
39+ RUN cp openssl/fuzz/corpora/server/* server-testcases/
40+ RUN zip gnutls_server_fuzzer_seed_corpus.zip server-testcases/*
41+
3542# Same thing for X.509
3643RUN mkdir x509-testcases
3744RUN cd x509-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/cert_corpus.tar.gz | tar -zx
3845RUN cp openssl/fuzz/corpora/x509/* x509-testcases/
3946RUN zip gnutls_x509_parser_fuzzer_seed_corpus.zip x509-testcases/*
4047
48+ # And private keys
49+ RUN mkdir private-key-testcases
50+ RUN cd private-key-testcases && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/privkey_corpus.tar.gz | tar -zx
51+ RUN cd private-key-testcases && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/pkcs8_corpus.tar.gz | tar -zx
52+ RUN zip gnutls_private_key_parser_fuzzer_seed_corpus.zip private-key-testcases/*
53+
4154WORKDIR gnutls
42- COPY build.sh gnutls_client_fuzzer.cc gnutls_x509_parser_fuzzer.cc $SRC/
55+ COPY build.sh $SRC/
Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ make bootstrap
1919./configure --enable-gcc-warnings --enable-static --with-included-libtasn1 --with-included-unistring --without-p11-kit --disable-doc
2020make " -j$( nproc) "
2121
22- fuzzers="
23- client
24- x509_parser
25- "
22+ fuzzers=$( find devel/fuzz/ -name " *_fuzzer.cc" )
2623
27- for fuzzer in $fuzzers ; do
24+ for f in $fuzzers ; do
25+ fuzzer=$( basename " $f " " .cc" )
2826 $CXX $CXXFLAGS -std=c++11 -Ilib/includes \
29- " $SRC /gnutls_ ${fuzzer} _fuzzer .cc" -o " $OUT /gnutls_ ${fuzzer} _fuzzer " \
27+ " devel/fuzz/ ${fuzzer} .cc" -o " $OUT /${fuzzer} " \
3028 lib/.libs/libgnutls.a -lFuzzingEngine -lpthread -Wl,-Bstatic \
3129 -lhogweed -lnettle -lgmp -Wl,-Bdynamic
3230
33- cp " $SRC /gnutls_${fuzzer} _fuzzer_seed_corpus.zip" " $OUT /"
31+ if [ -f " $SRC /${fuzzer} _seed_corpus.zip" ]; then
32+ cp " $SRC /${fuzzer} _seed_corpus.zip" " $OUT /"
33+ fi
3434done
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments