From 9cd7edf1e042b85048714da96cfa9a5c5c99e2b1 Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Fri, 31 Jul 2020 14:24:05 -0400 Subject: [PATCH] travis: download, compile, and install a swTPM Verifying the "boot_aggregate" requires reading the TPM PCRs for each of the TPM banks. In test environments without a physical TPM, a software TPM may be used. Signed-off-by: Mimi Zohar --- .travis.yml | 2 ++ tests/install-swtpm.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100755 tests/install-swtpm.sh diff --git a/.travis.yml b/.travis.yml index bf28789..fa2a376 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ addons: - xsltproc - docbook-xsl - docbook-xml +install: + - ./tests/install-swtpm.sh script: - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check TESTS="ima_hash.test sign_verify.test"; diff --git a/tests/install-swtpm.sh b/tests/install-swtpm.sh new file mode 100755 index 0000000..071e9c9 --- /dev/null +++ b/tests/install-swtpm.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -ex +wget https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm1332.tar.gz/download +mkdir ibmtpm1332 +cd ibmtpm1332 +tar -xvzf ../download +cd src +make -j$(nproc) +sudo cp tpm_server /usr/local/bin/ +cd ../..