aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/cryptofuzz
diff options
context:
space:
mode:
authorGravatar Guido Vranken <guidovranken@users.noreply.github.com>2020-04-26 05:19:27 +0200
committerGravatar GitHub <noreply@github.com>2020-04-25 20:19:27 -0700
commit24cb3468e1d7954848546a7baeccea0bf0ca5dcc (patch)
tree1eaf358e754c5e81e679784907e6e503d47c3189 /projects/cryptofuzz
parent61b6f42c72e8e8f2d8fd62b30bb5a7f9a3d10380 (diff)
[cryptofuzz] Add libtomcrypt (#3713)
Diffstat (limited to 'projects/cryptofuzz')
-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* ]]