From 9f3ede24998ab496913ef62a0e53d80693410f7a Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Fri, 30 Oct 2020 19:48:14 +0100 Subject: [PATCH] Fix ecc-diff-fuzzer build (#4581) * Fix ecc-diff-fuzzer build by using a more recent npm version * Remove useless symlink in ecc-diff-fuzzer * Remove old libgcrypt --- projects/ecc-diff-fuzzer/Dockerfile | 6 +++++- projects/ecc-diff-fuzzer/build.sh | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/projects/ecc-diff-fuzzer/Dockerfile b/projects/ecc-diff-fuzzer/Dockerfile index 85ec600dc..0ea8a4e4b 100644 --- a/projects/ecc-diff-fuzzer/Dockerfile +++ b/projects/ecc-diff-fuzzer/Dockerfile @@ -15,8 +15,12 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN apt-get update && apt-get install -y make cmake bzip2 autoconf automake gettext libtool python nodejs npm +RUN apt-get update && apt-get install -y make cmake bzip2 autoconf automake gettext libtool python curl RUN rustup target add i686-unknown-linux-gnu +#use different package sources for recent npm +RUN curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh +RUN bash nodesource_setup.sh +RUN apt install -y nodejs RUN npm install -g browserify RUN npm install elliptic RUN git clone --depth 1 https://github.com/horhof/quickjs quickjs diff --git a/projects/ecc-diff-fuzzer/build.sh b/projects/ecc-diff-fuzzer/build.sh index 2834a9b7e..3c1ccc3ec 100755 --- a/projects/ecc-diff-fuzzer/build.sh +++ b/projects/ecc-diff-fuzzer/build.sh @@ -122,9 +122,6 @@ cp quickjs*.h /usr/local/include/ cp libquickjs.a /usr/local/lib/ ) -ln -s /usr/bin/nodejs /usr/bin/node -mv /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libcrypto_old.a -mv /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libcrypto_old.so #build fuzz target cd ecfuzzer if [ "$ARCHITECTURE" = 'i386' ]; then @@ -151,5 +148,3 @@ fi cmake -DDISABLE_CRYPTOPP=ON -DDISABLE_JS=ON .. make -j$(nproc) cp ecfuzzer $OUT/fuzz_ec_noblocker -mv /usr/lib/x86_64-linux-gnu/libcrypto_old.a /usr/lib/x86_64-linux-gnu/libcrypto.a -mv /usr/lib/x86_64-linux-gnu/libcrypto_old.so /usr/lib/x86_64-linux-gnu/libcrypto.so