• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FROM tpm2software/tpm2-tss AS base
2
3COPY . /tmp/tpm2-tss/
4WORKDIR /tmp/tpm2-tss
5ENV LD_LIBRARY_PATH /usr/local/lib
6
7# Install libjson-c
8RUN apt-get update && apt-get install -y --no-install-recommends \
9       libjson-c-dev \
10       && rm -rf /var/lib/apt/lists/*
11
12# Fuzzing
13FROM base AS fuzzing
14ENV GEN_FUZZ 1
15RUN ./bootstrap \
16  && ./configure \
17     CC=clang \
18     CXX=clang++ \
19     --enable-debug \
20     --with-fuzzing=libfuzzer \
21     --enable-tcti-fuzzing \
22     --enable-tcti-device=no \
23     --enable-tcti-mssim=no \
24     --with-maxloglevel=none \
25     --disable-shared \
26  && make -j $(nproc) check
27RUN cat test-suite.log
28
29# TPM2-TSS
30FROM base
31RUN ./bootstrap \
32	&& ./configure --enable-unit \
33	&& make -j$(nproc) check \
34	&& make install \
35	&& ldconfig
36RUN cat test-suite.log
37