mirror of https://github.com/google/oss-fuzz.git
[gnutls] use an initial corpus for x509 (#164)
* [gnutls] use an initial corpus for x509 and add OpenSSL's corpus for client transcripts * Use --depth=1 on clones
This commit is contained in:
parent
0ad5352198
commit
6b27f9b7fa
|
@ -18,14 +18,25 @@ FROM ossfuzz/base-libfuzzer
|
||||||
MAINTAINER alex.gaynor@gmail.com
|
MAINTAINER alex.gaynor@gmail.com
|
||||||
RUN apt-get install -y make autoconf automake libtool autopoint libnettle6 nettle-dev pkg-config gperf bison autogen texinfo curl
|
RUN apt-get install -y make autoconf automake libtool autopoint libnettle6 nettle-dev pkg-config gperf bison autogen texinfo curl
|
||||||
|
|
||||||
RUN git clone https://gitlab.com/gnutls/gnutls.git
|
RUN git clone --depth=1 https://gitlab.com/gnutls/gnutls.git
|
||||||
RUN cd gnutls && git submodule update --init
|
RUN cd gnutls && git submodule update --init
|
||||||
|
|
||||||
# Using the client_corpus transcripts from boringssl, they're a decent starting point.
|
# clone OpenSSL to get it's fuzzer testcases
|
||||||
RUN mkdir boringssl-testcases
|
RUN git clone --depth=1 https://github.com/openssl/openssl
|
||||||
RUN cd boringssl-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/client_corpus.tar.gz | tar -zx
|
|
||||||
RUN cd boringssl-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/client_corpus_no_fuzzer_mode.tar.gz | tar -zx
|
# Using the client_corpus transcripts from BoringSSL and OpenSSL, they're a
|
||||||
RUN zip gnutls_client_fuzzer_seed_corpus.zip boringssl-testcases/*
|
# decent starting point.
|
||||||
|
RUN mkdir client-testcases
|
||||||
|
RUN cd client-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/client_corpus.tar.gz | tar -zx
|
||||||
|
RUN cd client-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/client_corpus_no_fuzzer_mode.tar.gz | tar -zx
|
||||||
|
RUN cp openssl/fuzz/corpora/client/* client-testcases/
|
||||||
|
RUN zip gnutls_client_fuzzer_seed_corpus.zip client-testcases/*
|
||||||
|
|
||||||
|
# Same thing for X.509
|
||||||
|
RUN mkdir x509-testcases
|
||||||
|
RUN cd x509-testcases/ && curl https://boringssl.googlesource.com/boringssl/+archive/master/fuzz/cert_corpus.tar.gz | tar -zx
|
||||||
|
RUN cp openssl/fuzz/corpora/x509/* x509-testcases/
|
||||||
|
RUN zip gnutls_x509_parser_fuzzer_seed_corpus.zip x509-testcases/*
|
||||||
|
|
||||||
WORKDIR gnutls
|
WORKDIR gnutls
|
||||||
COPY build.sh gnutls_client_fuzzer.cc gnutls_x509_parser_fuzzer.cc $SRC/
|
COPY build.sh gnutls_client_fuzzer.cc gnutls_x509_parser_fuzzer.cc $SRC/
|
||||||
|
|
|
@ -29,6 +29,6 @@ for fuzzer in $fuzzers; do
|
||||||
"$SRC/gnutls_${fuzzer}_fuzzer.cc" -o "$OUT/gnutls_${fuzzer}_fuzzer" \
|
"$SRC/gnutls_${fuzzer}_fuzzer.cc" -o "$OUT/gnutls_${fuzzer}_fuzzer" \
|
||||||
lib/.libs/libgnutls.a -lFuzzingEngine -lpthread -Wl,-Bstatic \
|
lib/.libs/libgnutls.a -lFuzzingEngine -lpthread -Wl,-Bstatic \
|
||||||
-lhogweed -lnettle -lgmp -Wl,-Bdynamic
|
-lhogweed -lnettle -lgmp -Wl,-Bdynamic
|
||||||
done
|
|
||||||
|
|
||||||
cp "$SRC/gnutls_client_fuzzer_seed_corpus.zip" "$OUT/"
|
cp "$SRC/gnutls_${fuzzer}_fuzzer_seed_corpus.zip" "$OUT/"
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue