diff options
author | 2021-03-07 15:22:59 +0100 | |
---|---|---|
committer | 2021-03-07 06:22:59 -0800 | |
commit | 406e14764661b95d59fd8064fe5a5e92d1fc45ca (patch) | |
tree | e8e6c9b831217d167e5a4d95f2c51ce35833a107 | |
parent | ccfbc216768257d1d420bbde747446ab316be907 (diff) |
[wolfssl] Import Wycheproof test vectors into corpus (#5314)
-rw-r--r-- | projects/wolfssl/Dockerfile | 1 | ||||
-rwxr-xr-x | projects/wolfssl/build.sh | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/projects/wolfssl/Dockerfile b/projects/wolfssl/Dockerfile index 39742cc7..963f5e0e 100644 --- a/projects/wolfssl/Dockerfile +++ b/projects/wolfssl/Dockerfile @@ -23,6 +23,7 @@ RUN git clone --depth 1 https://github.com/guidovranken/fuzzing-headers.git RUN git clone --depth 1 https://github.com/guidovranken/wolf-ssl-ssh-fuzzers RUN git clone --depth 1 https://github.com/guidovranken/cryptofuzz RUN git clone --depth 1 https://github.com/randombit/botan.git +RUN git clone --depth 1 https://github.com/google/wycheproof.git RUN wget https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2 RUN git clone https://github.com/wolfssl/oss-fuzz-targets --depth 1 $SRC/fuzz-targets diff --git a/projects/wolfssl/build.sh b/projects/wolfssl/build.sh index bef4928d..70db4538 100755 --- a/projects/wolfssl/build.sh +++ b/projects/wolfssl/build.sh @@ -186,6 +186,17 @@ then unset WOLFCRYPT_LIBWOLFSSL_A_PATH unset WOLFCRYPT_INCLUDE_PATH + # Convert Wycheproof test vectors to Cryptofuzz corpus format + mkdir $SRC/corpus-cryptofuzz-wycheproof/ + find $SRC/wycheproof/testvectors/ -type f -name 'ecdsa_*' -exec $SRC/cryptofuzz-disable-fastmath/cryptofuzz --from-wycheproof={},$SRC/corpus-cryptofuzz-wycheproof/ \; + # Pack it + zip -j $SRC/cryptofuzz_wycheproof_seed_corpus.zip $SRC/corpus-cryptofuzz-wycheproof/* + # Use it as the seed corpus for each Cryptofuzz-based fuzzer + cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math-all_seed_corpus.zip + cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math-all-8bit_seed_corpus.zip + cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-sp-math_seed_corpus.zip + cp $SRC/cryptofuzz_wycheproof_seed_corpus.zip $OUT/cryptofuzz-disable-fastmath_seed_corpus.zip + # Build SSL/SSH fuzzers NEW_SRC=$SRC/wolf-ssl-ssh-fuzzers/oss-fuzz/projects/wolf-ssl-ssh/ cp -R $SRC/wolfssl/ $NEW_SRC |