1# Copyright 2019 Google Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15################################################################################
16
17FROM gcr.io/oss-fuzz-base/base-builder
18
19RUN apt-get update && \
20    apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget && \
21    wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - && \
22    apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' && \
23    apt-get update && \
24    apt-get install -y software-properties-common python-software-properties make autoconf automake libtool build-essential cmake mercurial gyp ninja-build zlib1g-dev libsqlite3-dev bison flex texinfo
25
26RUN git clone --depth 1 https://github.com/guidovranken/cryptofuzz
27RUN git clone --depth 1 https://github.com/guidovranken/cryptofuzz-corpora
28RUN git clone --depth 1 https://github.com/openssl/openssl
29RUN git clone --depth 1 https://boringssl.googlesource.com/boringssl
30RUN git clone --depth 1 https://github.com/libressl-portable/portable libressl
31RUN cd $SRC/libressl && ./update.sh
32RUN git clone --depth 1 https://github.com/weidai11/cryptopp/
33RUN git clone --depth 1 git://git.gnupg.org/libgcrypt.git
34RUN wget https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2
35RUN git clone --depth 1 -b oss-fuzz https://github.com/project-everest/hacl-star evercrypt
36RUN git clone --depth 1 https://github.com/google/cityhash.git
37RUN git clone --depth 1 https://github.com/randombit/botan.git
38RUN git clone --depth 1 https://github.com/wolfSSL/wolfssl.git
39RUN git clone --depth 1 https://github.com/ARMmbed/mbedtls.git
40RUN hg clone https://hg.mozilla.org/projects/nspr
41RUN hg clone https://hg.mozilla.org/projects/nss
42RUN git clone --depth 1 https://github.com/jedisct1/libsodium.git
43RUN git clone --depth 1 https://github.com/libtom/libtomcrypt.git
44RUN git clone --depth 1 https://github.com/microsoft/SymCrypt.git
45RUN git clone --depth 1 https://git.lysator.liu.se/nettle/nettle
46RUN hg clone https://gmplib.org/repo/gmp/ libgmp/
47RUN wget https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.5.0.tar.gz
48RUN git clone --depth 1 https://github.com/indutny/bn.js.git
49RUN git clone --depth 1 https://github.com/MikeMcl/bignumber.js.git
50RUN git clone --depth 1 https://github.com/guidovranken/libfuzzer-js.git
51RUN git clone --depth 1 https://github.com/brix/crypto-js.git
52RUN git clone --depth 1 https://github.com/LoupVaillant/Monocypher.git
53RUN git clone --depth 1 https://github.com/trezor/trezor-firmware.git
54RUN git clone --depth 1 https://github.com/Cyan4973/xxHash.git
55RUN apt-get remove -y libunwind8
56RUN apt-get install -y libssl-dev
57RUN wget https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2
58
59COPY build.sh xxd.c $SRC/
60