mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-30 01:39:05 +00:00
added tpm restart timeout
cleanup cleared out tpmserver folder in reset cleared out tpmserver folder in reset
This commit is contained in:
parent
48205a27f1
commit
85e7999d8b
@ -27,7 +27,6 @@ function setTpmPcrValues {
|
|||||||
make -f makefiletpmc > /dev/null
|
make -f makefiletpmc > /dev/null
|
||||||
cd ../utils
|
cd ../utils
|
||||||
./startup
|
./startup
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +58,7 @@ function initTpm2Emulator {
|
|||||||
echo "DBus started"
|
echo "DBus started"
|
||||||
|
|
||||||
# Give DBus time to start up
|
# Give DBus time to start up
|
||||||
sleep 5
|
sleep 3
|
||||||
|
|
||||||
/ibmtpm/src/./tpm_server &
|
/ibmtpm/src/./tpm_server &
|
||||||
echo "TPM Emulator started"
|
echo "TPM Emulator started"
|
||||||
@ -74,7 +73,7 @@ function initTpm2Emulator {
|
|||||||
echo "TPM2-Abrmd started"
|
echo "TPM2-Abrmd started"
|
||||||
|
|
||||||
# Give ABRMD time to start and register on the DBus
|
# Give ABRMD time to start and register on the DBus
|
||||||
sleep 2
|
sleep 1
|
||||||
|
|
||||||
# Certificates
|
# Certificates
|
||||||
ek_cert="/HIRS/.ci/setup/certs/ek_cert.der"
|
ek_cert="/HIRS/.ci/setup/certs/ek_cert.der"
|
||||||
@ -113,15 +112,16 @@ function initTpm2Emulator {
|
|||||||
# Clear our existing PCR values by restarting the ibm tpm simulator
|
# Clear our existing PCR values by restarting the ibm tpm simulator
|
||||||
function resetTpm2Emulator {
|
function resetTpm2Emulator {
|
||||||
|
|
||||||
echo "clearing the TPM PCR values"
|
echo "clearing the TPM PCR values"
|
||||||
|
|
||||||
pkill -f "tpm2-abrmd"
|
pkill -f "tpm2-abrmd"
|
||||||
pkill -f "tpm_server"
|
pkill -f "tpm_server"
|
||||||
/ibmtpm/src/./tpm_server &
|
rm -rf /ibmtpm/tpmvstudio/tpm_server
|
||||||
sleep 1
|
/ibmtpm/src/./tpm_server &
|
||||||
|
sleep 1
|
||||||
pushd /ibmtss/utils > /dev/null
|
pushd /ibmtss/utils > /dev/null
|
||||||
./startup
|
./startup
|
||||||
sleep 1
|
sleep 3
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
tpm2-abrmd -t socket &
|
tpm2-abrmd -t socket &
|
||||||
}
|
}
|
||||||
@ -129,7 +129,6 @@ sleep 1
|
|||||||
# 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 ""
|
||||||
echo "===========Updating ${HIRS_SITE_CONFIG}, using values from /HIRS/.ci/docker/.env file...==========="
|
echo "===========Updating ${HIRS_SITE_CONFIG}, using values from /HIRS/.ci/docker/.env file...==========="
|
||||||
cat /HIRS/.ci/docker/.env
|
cat /HIRS/.ci/docker/.env
|
||||||
|
@ -79,7 +79,7 @@ if [[ ! -f $pcrScript ]]; then
|
|||||||
pcrScript="$profileDir/default/"$profile"_default_setpcrs.sh"
|
pcrScript="$profileDir/default/"$profile"_default_setpcrs.sh"
|
||||||
fi
|
fi
|
||||||
sh $pcrScript;
|
sh $pcrScript;
|
||||||
echo "PCR script was $pcrScript"
|
#echo "PCR script was $pcrScript"
|
||||||
#tpm2_pcrlist -g sha256
|
#tpm2_pcrlist -g sha256
|
||||||
|
|
||||||
# Done with rim_setup
|
# Done with rim_setup
|
Loading…
Reference in New Issue
Block a user