mirror of https://github.com/google/oss-fuzz.git
Adds botan to ecc differential fuzzer (#2830)
This commit is contained in:
parent
f986fafb8e
commit
9917e148ea
|
@ -16,15 +16,16 @@
|
||||||
|
|
||||||
FROM gcr.io/oss-fuzz-base/base-builder
|
FROM gcr.io/oss-fuzz-base/base-builder
|
||||||
MAINTAINER p.antoine@catenacyber.fr
|
MAINTAINER p.antoine@catenacyber.fr
|
||||||
RUN apt-get update && apt-get install -y make cmake bzip2 autoconf automake libtool
|
RUN apt-get update && apt-get install -y make cmake bzip2 autoconf automake libtool python
|
||||||
RUN git clone --depth 1 https://github.com/catenacyber/elliptic-curve-differential-fuzzer.git ecfuzzer
|
RUN git clone --depth 1 https://github.com/catenacyber/elliptic-curve-differential-fuzzer.git ecfuzzer
|
||||||
RUN git clone --recursive --depth 1 https://github.com/ARMmbed/mbedtls.git mbedtls
|
RUN git clone --recursive --depth 1 https://github.com/ARMmbed/mbedtls.git mbedtls
|
||||||
RUN git clone --depth 1 https://github.com/ANSSI-FR/libecc.git libecc
|
RUN git clone --depth 1 https://github.com/ANSSI-FR/libecc.git libecc
|
||||||
RUN git clone --depth 1 https://github.com/openssl/openssl.git openssl
|
RUN git clone --depth 1 https://github.com/openssl/openssl.git openssl
|
||||||
ADD https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.32.tar.bz2 libgpg-error-1.32.tar.bz2
|
ADD https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2 libgpg-error-1.36.tar.bz2
|
||||||
RUN git clone --depth 1 https://github.com/gpg/libgcrypt gcrypt
|
RUN git clone --depth 1 https://github.com/gpg/libgcrypt gcrypt
|
||||||
RUN git clone --depth 1 https://github.com/weidai11/cryptopp cryptopp
|
RUN git clone --depth 1 https://github.com/weidai11/cryptopp cryptopp
|
||||||
ADD https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2 gmp-6.1.2.tar.bz2
|
ADD https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2 gmp-6.1.2.tar.bz2
|
||||||
RUN git clone --depth 1 https://github.com/gnutls/nettle.git nettle
|
RUN git clone --depth 1 https://github.com/gnutls/nettle.git nettle
|
||||||
|
RUN git clone --depth 1 https://github.com/randombit/botan.git botan
|
||||||
WORKDIR $SRC/
|
WORKDIR $SRC/
|
||||||
COPY build.sh $SRC/
|
COPY build.sh $SRC/
|
||||||
|
|
|
@ -41,8 +41,8 @@ make
|
||||||
#gcrypt
|
#gcrypt
|
||||||
(
|
(
|
||||||
cd gcrypt
|
cd gcrypt
|
||||||
tar -xvf ../libgpg-error-1.32.tar.bz2
|
tar -xvf ../libgpg-error-1.36.tar.bz2
|
||||||
cd libgpg-error-1.32
|
cd libgpg-error-1.36
|
||||||
./configure --enable-static --disable-shared
|
./configure --enable-static --disable-shared
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
@ -74,6 +74,16 @@ cd libecc
|
||||||
(export CFLAGS="$CFLAGS -fPIC"; make)
|
(export CFLAGS="$CFLAGS -fPIC"; make)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#botan
|
||||||
|
(
|
||||||
|
cd botan
|
||||||
|
#help it find libstdc++
|
||||||
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so
|
||||||
|
export LDFLAGS=$CXXFLAGS
|
||||||
|
./configure.py --disable-shared-library
|
||||||
|
make
|
||||||
|
)
|
||||||
|
|
||||||
#build fuzz target
|
#build fuzz target
|
||||||
cd ecfuzzer
|
cd ecfuzzer
|
||||||
zip -r fuzz_ec_seed_corpus.zip corpus/
|
zip -r fuzz_ec_seed_corpus.zip corpus/
|
||||||
|
@ -87,5 +97,6 @@ $CC $CFLAGS -DWITH_STDLIB -I. -I../libecc/src -c modules/libecc.c -o libecc.o
|
||||||
$CC $CFLAGS -I. -I../gcrypt/src -c modules/gcrypt.c -o gcrypt.o
|
$CC $CFLAGS -I. -I../gcrypt/src -c modules/gcrypt.c -o gcrypt.o
|
||||||
$CXX $CXXFLAGS -I. -I../ -c modules/cryptopp.cpp -o cryptopp.o
|
$CXX $CXXFLAGS -I. -I../ -c modules/cryptopp.cpp -o cryptopp.o
|
||||||
$CC $CFLAGS -I. -I../ -c modules/nettle.c -o nettle.o
|
$CC $CFLAGS -I. -I../ -c modules/nettle.c -o nettle.o
|
||||||
|
$CXX $CXXFLAGS -std=c++11 -I. -I../ -I../botan/build/include -c modules/botan.cpp -o botan.o
|
||||||
|
|
||||||
$CXX $CXXFLAGS fuzz_ec.o mbedtls.o libecc.o openssl.o gcrypt.o cryptopp.o nettle.o -o $OUT/fuzz_ec ../mbedtls/crypto/library/libmbedcrypto.a ../libecc/build/libec.a ../libecc/src/external_deps/rand.o ../openssl/libcrypto.a ../nettle/libhogweed.a ../nettle/libnettle.a ../nettle/gmp-6.1.2/.libs/libgmp.a ../gcrypt/src/.libs/libgcrypt.a ../cryptopp/libcryptopp.a -lgpg-error $LIB_FUZZING_ENGINE
|
$CXX $CXXFLAGS fuzz_ec.o mbedtls.o libecc.o openssl.o gcrypt.o cryptopp.o nettle.o botan.o -o $OUT/fuzz_ec ../mbedtls/crypto/library/libmbedcrypto.a ../libecc/build/libec.a ../libecc/src/external_deps/rand.o ../openssl/libcrypto.a ../nettle/libhogweed.a ../nettle/libnettle.a ../nettle/gmp-6.1.2/.libs/libgmp.a ../gcrypt/src/.libs/libgcrypt.a ../cryptopp/libcryptopp.a ../botan/libbotan-2.a -lgpg-error $LIB_FUZZING_ENGINE
|
||||||
|
|
Loading…
Reference in New Issue