2018-02-20 20:49:56 +00:00
|
|
|
cd $SRC/openssl
|
|
|
|
if [[ $CFLAGS = *sanitize=memory* ]]
|
|
|
|
then
|
|
|
|
CFLAGS+=" -DOPENSSL_NO_ASM=1"
|
|
|
|
fi
|
2018-03-10 01:59:41 +00:00
|
|
|
./config
|
2018-02-20 20:49:56 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
# Build OpenSSL module
|
|
|
|
cd $SRC/bignum-fuzzer/modules/openssl
|
|
|
|
OPENSSL_INCLUDE_PATH=$SRC/openssl/include OPENSSL_LIBCRYPTO_A_PATH=$SRC/openssl/libcrypto.a make
|
|
|
|
|
|
|
|
# Build Go module
|
|
|
|
cd $SRC/bignum-fuzzer/modules/go
|
|
|
|
make
|
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
# Build Rust module
|
|
|
|
cd $SRC/bignum-fuzzer/modules/rust
|
|
|
|
make
|
|
|
|
|
2018-03-22 15:01:35 +00:00
|
|
|
# Build C++-Boost module
|
|
|
|
cd $SRC/bignum-fuzzer/modules/cpp_boost
|
|
|
|
make
|
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
BASE_CXXFLAGS=$CXXFLAGS
|
2018-02-20 20:49:56 +00:00
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
# Build OpenSSL/Go fuzzer
|
2018-02-20 20:49:56 +00:00
|
|
|
cd $SRC/bignum-fuzzer
|
|
|
|
./config-modules.sh openssl go
|
2018-03-10 01:59:41 +00:00
|
|
|
CXXFLAGS="$BASE_CXXFLAGS -DBNFUZZ_FLAG_NO_NEGATIVE=1 -DBNFUZZ_FLAG_NUM_LEN=1200 -DBNFUZZ_FLAG_ALL_OPERATIONS=1"
|
2018-02-20 20:49:56 +00:00
|
|
|
LIBFUZZER_LINK="-lFuzzingEngine" make
|
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
# Copy OpenSSL/Go fuzzer to the designated location
|
2018-02-20 20:49:56 +00:00
|
|
|
cp $SRC/bignum-fuzzer/fuzzer $OUT/fuzzer_openssl_go_no_negative_num_len_1200_all_operations
|
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
# Build OpenSSL/Rust fuzzer
|
|
|
|
cd $SRC/bignum-fuzzer
|
|
|
|
make clean
|
|
|
|
./config-modules.sh openssl rust
|
|
|
|
CXXFLAGS="$BASE_CXXFLAGS -DBNFUZZ_FLAG_NUM_LEN=1200 -DBNFUZZ_FLAG_ALL_OPERATIONS=1 -DBNFUZZ_FLAG_NUM_LOOPS=1"
|
|
|
|
LIBFUZZER_LINK="-lFuzzingEngine" make
|
|
|
|
|
|
|
|
# Copy OpenSSL/Rust fuzzer to the designated location
|
|
|
|
cp $SRC/bignum-fuzzer/fuzzer $OUT/fuzzer_openssl_rust_num_len_1200_all_operations_num_loops_1
|
2018-02-23 15:51:45 +00:00
|
|
|
|
2018-03-22 15:01:35 +00:00
|
|
|
# Build OpenSSL/C++-Boost fuzzer
|
|
|
|
cd $SRC/bignum-fuzzer
|
|
|
|
make clean
|
|
|
|
./config-modules.sh openssl cpp_boost
|
|
|
|
CXXFLAGS="$BASE_CXXFLAGS -DBNFUZZ_FLAG_NUM_LEN=1200 -DBNFUZZ_FLAG_ALL_OPERATIONS=1 -DBNFUZZ_FLAG_NUM_LOOPS=1"
|
|
|
|
LIBFUZZER_LINK="-lFuzzingEngine" make
|
|
|
|
|
|
|
|
# Copy OpenSSL/C++-Boost fuzzer to the designated location
|
|
|
|
cp $SRC/bignum-fuzzer/fuzzer $OUT/fuzzer_openssl_cpp_boost_num_len_1200_all_operations_num_loops_1
|
|
|
|
|
2018-03-10 01:59:41 +00:00
|
|
|
# Copy seed corpora to the designated location
|
2018-02-23 15:51:45 +00:00
|
|
|
cp $SRC/bignum-fuzzer/corpora/fuzzer_openssl_go_no_negative_num_len_1200_all_operations_seed_corpus.zip $OUT
|
2018-03-10 01:59:41 +00:00
|
|
|
cp $SRC/bignum-fuzzer/corpora/fuzzer_openssl_rust_num_len_1200_all_operations_num_loops_1_seed_corpus.zip $OUT
|
2018-03-22 15:01:35 +00:00
|
|
|
cp $SRC/bignum-fuzzer/corpora/fuzzer_openssl_cpp_boost_num_len_1200_all_operations_num_loops_1_seed_corpus.zip $OUT
|