mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-05-01 00:10:22 +00:00
fix tcg_properties path
This commit is contained in:
parent
79bc90046d
commit
1d114490ec
@ -8,7 +8,7 @@ pushd / > /dev/null
|
|||||||
echo "Setting up TPM emulator for the TPM2 Provisioner"
|
echo "Setting up TPM emulator for the TPM2 Provisioner"
|
||||||
|
|
||||||
# Function to make and install TPM 2.0 Provisioner packages
|
# Function to make and install TPM 2.0 Provisioner packages
|
||||||
function InstallProvisioner {
|
function installProvisioner {
|
||||||
echo "===========Installing TPM 2.0 Provisioner Packages...==========="
|
echo "===========Installing TPM 2.0 Provisioner Packages...==========="
|
||||||
pushd /HIRS > /dev/null
|
pushd /HIRS > /dev/null
|
||||||
echo "Building the HIRS Provisioner ..."
|
echo "Building the HIRS Provisioner ..."
|
||||||
@ -44,7 +44,7 @@ echo "tcg.event.file=/sys/kernel/security/tpm0/binary_bios_measurements" >> $pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Function to initialize the TPM 2.0 Emulator
|
# Function to initialize the TPM 2.0 Emulator
|
||||||
function InitTpm2Emulator {
|
function initTpm2Emulator {
|
||||||
echo "===========Initializing TPM 2.0 Emulator...==========="
|
echo "===========Initializing TPM 2.0 Emulator...==========="
|
||||||
|
|
||||||
mkdir -p /var/run/dbus
|
mkdir -p /var/run/dbus
|
||||||
@ -113,7 +113,7 @@ function InitTpm2Emulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Function to update the hirs-site.config file
|
# Function to update the hirs-site.config file
|
||||||
function UpdateHirsSiteConfigFile {
|
function updateHirsSiteConfigFile {
|
||||||
HIRS_SITE_CONFIG="/etc/hirs/hirs-site.config"
|
HIRS_SITE_CONFIG="/etc/hirs/hirs-site.config"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@ -142,7 +142,7 @@ DEFAULT_SITE_CONFIG_FILE
|
|||||||
cat /etc/hirs/hirs-site.config
|
cat /etc/hirs/hirs-site.config
|
||||||
}
|
}
|
||||||
|
|
||||||
function WaitForAca {
|
function waitForAca {
|
||||||
# Wait for ACA to boot
|
# Wait for ACA to boot
|
||||||
echo "Waiting for ACA to spin up at address ${HIRS_ACA_PORTAL_IP} on port ${HIRS_ACA_PORTAL_PORT} ..."
|
echo "Waiting for ACA to spin up at address ${HIRS_ACA_PORTAL_IP} on port ${HIRS_ACA_PORTAL_PORT} ..."
|
||||||
until [ "`curl --silent --connect-timeout 1 -I -k https://${HIRS_ACA_PORTAL_IP}:${HIRS_ACA_PORTAL_PORT}/HIRS_AttestationCAPortal | grep '302 Found'`" != "" ]; do
|
until [ "`curl --silent --connect-timeout 1 -I -k https://${HIRS_ACA_PORTAL_IP}:${HIRS_ACA_PORTAL_PORT}/HIRS_AttestationCAPortal | grep '302 Found'`" != "" ]; do
|
||||||
@ -153,10 +153,10 @@ echo "ACA is up!"
|
|||||||
}
|
}
|
||||||
|
|
||||||
#Wait for the ACA to spin up, if it hasnt already
|
#Wait for the ACA to spin up, if it hasnt already
|
||||||
WaitForAca
|
waitForAca
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
InstallProvisioner
|
installProvisioner
|
||||||
|
|
||||||
# Test to see if provisioner config were set up
|
# Test to see if provisioner config were set up
|
||||||
echo "TPM2 Provisioner container running:"
|
echo "TPM2 Provisioner container running:"
|
||||||
@ -168,10 +168,10 @@ echo "TPM2 Provisioner container running:"
|
|||||||
echo "Contents of /etc/hirs is $(ls -al /etc/hirs)";
|
echo "Contents of /etc/hirs is $(ls -al /etc/hirs)";
|
||||||
|
|
||||||
# Install TPM 2.0 Emulator
|
# Install TPM 2.0 Emulator
|
||||||
InitTpm2Emulator
|
initTpm2Emulator
|
||||||
|
|
||||||
# Update the hirs-site.config file
|
# Update the hirs-site.config file
|
||||||
UpdateHirsSiteConfigFile
|
updateHirsSiteConfigFile
|
||||||
|
|
||||||
echo "TPM 2.0 Emulator NV RAM list"
|
echo "TPM 2.0 Emulator NV RAM list"
|
||||||
tpm2_nvlist
|
tpm2_nvlist
|
||||||
|
@ -8,6 +8,8 @@ profile=$1
|
|||||||
test=$2
|
test=$2
|
||||||
tcgDir="/boot/tcg"
|
tcgDir="/boot/tcg"
|
||||||
testDir="/HIRS/.ci/system-tests/profiles/$profile/$test"
|
testDir="/HIRS/.ci/system-tests/profiles/$profile/$test"
|
||||||
|
propFile="/etc/hirs/tcg_boot.properties";
|
||||||
|
eventLog="$testDir"/"$profile"_"$test"_binary_bios_measurements
|
||||||
|
|
||||||
mkdir -p $tcgDir/manifest/rim/; # Create the platform cert folder if its not there
|
mkdir -p $tcgDir/manifest/rim/; # Create the platform cert folder if its not there
|
||||||
rm -f $tcgDir/manifest/rim/*; # clear out any previous data
|
rm -f $tcgDir/manifest/rim/*; # clear out any previous data
|
||||||
@ -18,8 +20,6 @@ rm -f $tcgDir/manifest/swidtag/*; # clear out any previous data
|
|||||||
echo "Test is using RIM files from $profile : $test"
|
echo "Test is using RIM files from $profile : $test"
|
||||||
|
|
||||||
# update tcg_boot.properties to use test specific binary_bios_measurement file
|
# update tcg_boot.properties to use test specific binary_bios_measurement file
|
||||||
eventLog="$testDir"/"$profile"_"$test"_binary_bios_measurements
|
|
||||||
|
|
||||||
sed -i "s:tcg.event.file=.*:tcg.event.file=$eventLog:g" "$propFile"
|
sed -i "s:tcg.event.file=.*:tcg.event.file=$eventLog:g" "$propFile"
|
||||||
|
|
||||||
#echo "Contents of $propFile after sed is $(cat $propFile)";
|
#echo "Contents of $propFile after sed is $(cat $propFile)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user