aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--projects/cryptofuzz/Dockerfile1
-rwxr-xr-xprojects/cryptofuzz/build.sh15
2 files changed, 16 insertions, 0 deletions
diff --git a/projects/cryptofuzz/Dockerfile b/projects/cryptofuzz/Dockerfile
index 9eebbc21..85504d02 100644
--- a/projects/cryptofuzz/Dockerfile
+++ b/projects/cryptofuzz/Dockerfile
@@ -42,6 +42,7 @@ RUN git clone --depth 1 https://github.com/ARMmbed/mbed-crypto.git
RUN hg clone https://hg.mozilla.org/projects/nspr
RUN hg clone https://hg.mozilla.org/projects/nss
RUN git clone --depth 1 https://github.com/jedisct1/libsodium.git
+RUN git clone --depth 1 https://github.com/libtom/libtomcrypt.git
RUN apt-get remove -y libunwind8
RUN apt-get install -y libssl-dev
diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh
index e9773897..a7f394aa 100755
--- a/projects/cryptofuzz/build.sh
+++ b/projects/cryptofuzz/build.sh
@@ -79,6 +79,21 @@ then
make -B
fi
+
+# Compile libtomcrypt
+cd $SRC/libtomcrypt
+if [[ $CFLAGS != *sanitize=memory* ]]
+then
+ make -j$(nproc)
+ export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_LIBTOMCRYPT"
+ export LIBTOMCRYPT_INCLUDE_PATH=$(realpath src/headers/)
+ export LIBTOMCRYPT_A_PATH=$(realpath libtomcrypt.a)
+
+ # Compile Cryptofuzz libtomcrypt module
+ cd $SRC/cryptofuzz/modules/libtomcrypt
+ make -B
+fi
+
# Compile Cityhash
cd $SRC/cityhash
if [[ $CFLAGS != *-m32* ]]