From 27d875fbd17fb0b3cba59c321fab55f30e21f78d Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Thu, 3 Oct 2019 16:50:52 +0200 Subject: [PATCH] Adds i386 architecture to ecc-diff project (#2904) --- projects/ecc-diff-fuzzer/Dockerfile | 2 +- projects/ecc-diff-fuzzer/build.sh | 14 +++++++++++--- projects/ecc-diff-fuzzer/project.yaml | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/projects/ecc-diff-fuzzer/Dockerfile b/projects/ecc-diff-fuzzer/Dockerfile index 264f44e727ef..e717097753ca 100644 --- a/projects/ecc-diff-fuzzer/Dockerfile +++ b/projects/ecc-diff-fuzzer/Dockerfile @@ -22,7 +22,7 @@ RUN git clone --recursive --depth 1 https://github.com/ARMmbed/mbedtls.git mbedt 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 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 git://git.gnupg.org/libgcrypt.git 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 diff --git a/projects/ecc-diff-fuzzer/build.sh b/projects/ecc-diff-fuzzer/build.sh index 7e0f248de65a..e64d3ec9d09c 100755 --- a/projects/ecc-diff-fuzzer/build.sh +++ b/projects/ecc-diff-fuzzer/build.sh @@ -48,7 +48,7 @@ make make install cd .. ./autogen.sh -./configure --enable-static --disable-shared --disable-doc --enable-maintainer-mode +./configure --enable-static --disable-shared --disable-doc --enable-maintainer-mode --disable-asm make ) @@ -63,7 +63,11 @@ make -j$(nproc) all ( cd openssl #option to not have the same exported function poly1305_blocks as in gcrypt -./config no-poly1305 no-shared no-threads +if [ "$ARCHITECTURE" = 'i386' ]; then + setarch i386 ./config no-poly1305 no-shared no-threads -m32 +else + ./config no-poly1305 no-shared no-threads +fi make build_generated libcrypto.a ) @@ -80,7 +84,11 @@ 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 +if [ "$ARCHITECTURE" = 'i386' ]; then + ./configure.py --disable-shared-library --cpu x86_32 +else + ./configure.py --disable-shared-library +fi make ) diff --git a/projects/ecc-diff-fuzzer/project.yaml b/projects/ecc-diff-fuzzer/project.yaml index 968f80b4ff90..d6a5e0bd03db 100644 --- a/projects/ecc-diff-fuzzer/project.yaml +++ b/projects/ecc-diff-fuzzer/project.yaml @@ -1,2 +1,6 @@ homepage: "https://github.com/catenacyber/elliptic-curve-differential-fuzzer" primary_contact: "p.antoine@catenacyber.fr" + +architectures: +- x86_64 +- i386