HIRS/.ci/setup/container/setup_tpm2provisioner.sh
lareine 7013552e78 added tests folder
added tests folder

test tcg_boot.properties fix
2022-02-23 13:54:21 -05:00

39 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
#########################################################################################
# Script to setup the TPM 2.0 Provisioner for System Tests
# Initial setup only use resetTpm2Emulator to reset PCR values in subsequent tests
#########################################################################################
set -e
pushd / > /dev/null
echo "Setting up TPM emulator for the TPM2 Provisioner"
source /HIRS/.ci/setup/container/tpm2_common.sh
mkdir -p /etc/hirs
touch /etc/hirs/tcg_boot.properties # work around for install issues with tcg default values
#Wait for the ACA to spin up, if it hasnt already
waitForAca
# Install packages
installProvisioner
# set location of tcg artifacts
#setTcgProperties
#echo "Contents of /etc/hirs is $(ls -al /etc/hirs)";
# Install TPM 2.0 Emulator
initTpm2Emulator
# Update the hirs-site.config file
updateHirsSiteConfigFile
echo "TPM 2.0 Emulator NV RAM list"
tpm2_nvlist
echo ""
echo "===========HIRS ACA TPM 2.0 Provisioner Setup Complete!==========="
popd > /dev/null
#tpm2_pcrlist -g sha256