HIRS/.ci/setup/container/setup_tpm2provisioner.sh
lareine 48205a27f1 added wait to tpr2Reset
rewrote tcg_boot.properties

rewrote tcg_boot.properties
2022-02-23 13:54:27 -05:00

37 lines
958 B
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
#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