Skip to content

Commit

Permalink
Adds i386 architecture to ecc-diff project (google#2904)
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber authored and jonathanmetzman committed Oct 3, 2019
1 parent fe3673c commit 27d875f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion projects/ecc-diff-fuzzer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions projects/ecc-diff-fuzzer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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
)

Expand All @@ -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
)

Expand Down
4 changes: 4 additions & 0 deletions projects/ecc-diff-fuzzer/project.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
homepage: "https://github.com/catenacyber/elliptic-curve-differential-fuzzer"
primary_contact: "[email protected]"

architectures:
- x86_64
- i386

0 comments on commit 27d875f

Please sign in to comment.