From 779fe512d982b85d4cb89319d49af39a17628819 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Thu, 23 Aug 2018 11:47:30 +0200 Subject: [PATCH] Adds nettle to ecc-diff-fuzzer (#1748) --- projects/ecc-diff-fuzzer/Dockerfile | 2 ++ projects/ecc-diff-fuzzer/build.sh | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/projects/ecc-diff-fuzzer/Dockerfile b/projects/ecc-diff-fuzzer/Dockerfile index fce2cbe6a..8b4fe7f6f 100644 --- a/projects/ecc-diff-fuzzer/Dockerfile +++ b/projects/ecc-diff-fuzzer/Dockerfile @@ -24,5 +24,7 @@ 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 RUN git clone --depth 1 https://github.com/gpg/libgcrypt gcrypt 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 +RUN git clone --depth 1 https://github.com/gnutls/nettle.git nettle WORKDIR $SRC/ COPY build.sh $SRC/ diff --git a/projects/ecc-diff-fuzzer/build.sh b/projects/ecc-diff-fuzzer/build.sh index a5bebee47..80e155cb3 100755 --- a/projects/ecc-diff-fuzzer/build.sh +++ b/projects/ecc-diff-fuzzer/build.sh @@ -16,6 +16,20 @@ ################################################################################ # build projects +#nettle +( +cd nettle +tar -xvf ../gmp-6.1.2.tar.bz2 +cd gmp-6.1.2 +./configure +make +make install +cd .. +autoreconf +./configure +make +) + #cryptopp ( cd cryptopp @@ -70,5 +84,6 @@ $CC $CFLAGS -I. -I../openssl/include -c modules/openssl.c -o openssl.o $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 $CXX $CXXFLAGS -I. -I../ -c modules/cryptopp.cpp -o cryptopp.o +$CC $CFLAGS -I. -I../ -c modules/nettle.c -o nettle.o -$CXX $CXXFLAGS fuzz_ec.o mbedtls.o libecc.o openssl.o gcrypt.o cryptopp.o -o $OUT/fuzz_ec ../mbedtls/library/libmbedcrypto.a ../libecc/build/libec.a ../openssl/libcrypto.a ../gcrypt/src/.libs/libgcrypt.a ../cryptopp/libcryptopp.a -lgpg-error -lFuzzingEngine +$CXX $CXXFLAGS fuzz_ec.o mbedtls.o libecc.o openssl.o gcrypt.o cryptopp.o nettle.o -o $OUT/fuzz_ec ../mbedtls/library/libmbedcrypto.a ../libecc/build/libec.a ../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 -lFuzzingEngine