Skip to content

Commit

Permalink
[cryptofuzz] Enable wolfCrypt 32 bit builds (google#3008)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidovranken authored and jonathanmetzman committed Nov 5, 2019
1 parent af0ca61 commit c729e26
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions projects/cryptofuzz/build.sh
Expand Up @@ -91,27 +91,32 @@ fi

##############################################################################
# Compile wolfCrypt
if [[ $CFLAGS != *-m32* ]]
then
cd $SRC/wolfssl
autoreconf -ivf
if [[ $CFLAGS != *sanitize=memory* ]]
then
./configure --enable-static --enable-md2 --enable-md4 --enable-ripemd --enable-blake2 --enable-blake2s --enable-pwdbased --enable-scrypt --enable-hkdf --enable-cmac --enable-arc4 --enable-camellia --enable-rabbit --enable-aesccm --enable-aesctr --enable-hc128 --enable-xts --enable-des3 --enable-idea --enable-x963kdf --enable-harden
else
./configure --enable-static --enable-md2 --enable-md4 --enable-ripemd --enable-blake2 --enable-blake2s --enable-pwdbased --enable-scrypt --enable-hkdf --enable-cmac --enable-arc4 --enable-camellia --enable-rabbit --enable-aesccm --enable-aesctr --enable-hc128 --enable-xts --enable-des3 --enable-idea --enable-x963kdf --enable-harden --disable-asm
fi
make -j$(nproc) >/dev/null 2>&1
cd $SRC/wolfssl
autoreconf -ivf

export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_WOLFCRYPT"
export WOLFCRYPT_LIBWOLFSSL_A_PATH="$SRC/wolfssl/src/.libs/libwolfssl.a"
export WOLFCRYPT_INCLUDE_PATH="$SRC/wolfssl"
export WOLFCRYPT_CONFIGURE_PARAMS="--enable-static --enable-md2 --enable-md4 --enable-ripemd --enable-blake2 --enable-blake2s --enable-pwdbased --enable-scrypt --enable-hkdf --enable-cmac --enable-arc4 --enable-camellia --enable-rabbit --enable-aesccm --enable-aesctr --enable-hc128 --enable-xts --enable-des3 --enable-idea --enable-x963kdf --enable-harden"

# Compile Cryptofuzz wolfcrypt (without assembly) module
cd $SRC/cryptofuzz/modules/wolfcrypt
make -B
if [[ $CFLAGS = *sanitize=memory* ]]
then
export WOLFCRYPT_CONFIGURE_PARAMS="$WOLFCRYPT_CONFIGURE_PARAMS -disable-asm"
fi

if [[ $CFLAGS = *-m32* ]]
then
export WOLFCRYPT_CONFIGURE_PARAMS="$WOLFCRYPT_CONFIGURE_PARAMS -disable-fastmath"
fi

./configure $WOLFCRYPT_CONFIGURE_PARAMS
make -j$(nproc) >/dev/null 2>&1

export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_WOLFCRYPT"
export WOLFCRYPT_LIBWOLFSSL_A_PATH="$SRC/wolfssl/src/.libs/libwolfssl.a"
export WOLFCRYPT_INCLUDE_PATH="$SRC/wolfssl"

# Compile Cryptofuzz wolfcrypt (without assembly) module
cd $SRC/cryptofuzz/modules/wolfcrypt
make -B

##############################################################################
# Compile Botan
cd $SRC/botan
Expand Down

0 comments on commit c729e26

Please sign in to comment.