mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-04-14 14:36:51 +00:00
TPM for reset each test
This commit is contained in:
parent
b4edfb0d9a
commit
2235b6ab66
@ -51,6 +51,7 @@ fi
|
||||
if [ "$test" = "6" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA POLICY TEST 6: Test PC Validation Policy with valid PC with no Attribute Check ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
setPolicyEkPc_noAttCheck
|
||||
uploadTrustedCerts
|
||||
setPlatformCerts "laptop" "default"
|
||||
@ -58,8 +59,9 @@ if [ "$test" = "6" ] || [ "$test" = "all" ]; then
|
||||
fi
|
||||
if [ "$test" = "7" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA POLICY TEST 7: Test PC Validation Policy with valid PC with Attribute Check ###"
|
||||
writeToLog "Now using appsettings with hardware information"
|
||||
writeToLogs "Now using appsettings with hardware information"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
setPolicyEkPc
|
||||
uploadTrustedCerts
|
||||
setPlatformCerts "laptop" "default"
|
||||
@ -69,6 +71,7 @@ fi
|
||||
if [ "$test" = "8" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA POLICY TEST 8: Test PC with RIM Validation Policy with valid PC and RIM ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
setPolicyEkPcFw
|
||||
uploadTrustedCerts
|
||||
setPlatformCerts "laptop" "default"
|
||||
|
@ -18,9 +18,12 @@ esac
|
||||
# provisionTpm2 takes 1 parameter (the expected result): "pass" or "fail"
|
||||
# Note that the aca_policy_tests have already run several Platform Certificate system tests
|
||||
|
||||
setAppsettings --paccor-output-file /ci_test/hw.json --event-log-file /ci_test/binary_bios_measurements --linux-dmi
|
||||
|
||||
if [ "$test" = "1" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA PLATFORM CERTIFICATE TEST 1: Test a delta Platform Certificate that adds a new memory component ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
uploadTrustedCerts
|
||||
setPolicyEkPc
|
||||
setPlatformCerts "laptop" "deltaPlatMem"
|
||||
@ -29,6 +32,7 @@ fi
|
||||
if [ "$test" = "2" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA PLATFORM CERTIFICATE TEST 2: Test a Platform Certificate that is missing a memory component ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
uploadTrustedCerts
|
||||
setPlatformCerts "laptop" "platCertLight"
|
||||
provisionTpm2 "pass"
|
||||
@ -36,6 +40,7 @@ fi
|
||||
if [ "$test" = "3" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA PLATFORM CERTIFICATE TEST 3: Test a Delta Platform Certificate that has a wrong a memory component ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
uploadTrustedCerts
|
||||
setPlatformCerts "laptop" "badDeltaMem"
|
||||
provisionTpm2 "fail"
|
||||
@ -47,4 +52,4 @@ if [[ $failedTests != 0 ]]; then
|
||||
echo "**** $failedTests out of $totalTests Platform Certificate Tests Failed! ****"
|
||||
else
|
||||
echo "**** $totalTests Platform Certificate Tests Passed! ****"
|
||||
fi
|
||||
fi
|
||||
|
@ -31,6 +31,7 @@ fi
|
||||
if [ "$test" = "2" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA RIM TEST 2: Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
uploadTrustedCerts
|
||||
setPolicyEkPcFw
|
||||
setPlatformCerts "laptop" "badOemInstall"
|
||||
@ -40,6 +41,7 @@ fi
|
||||
if [ "$test" = "3" ] || [ "$test" = "all" ]; then
|
||||
writeToLogs "### ACA RIM TEST 3: Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement ###"
|
||||
clearAcaDb
|
||||
resetTpmForNewTest
|
||||
uploadTrustedCerts
|
||||
setPolicyEkPcFw
|
||||
setPlatformCerts "laptop" "badVarInstall"
|
||||
|
@ -356,7 +356,7 @@ public class SupplyChainValidationService {
|
||||
}
|
||||
|
||||
BaseReferenceManifest bRim = null;
|
||||
if (sRim.getAssociatedRim() != null) {
|
||||
if (sRim != null && sRim.getAssociatedRim() != null) {
|
||||
Optional<ReferenceManifest> oRim = referenceManifestRepository.findById(sRim.getAssociatedRim());
|
||||
if (oRim.isPresent()) {
|
||||
ReferenceManifest rim = oRim.get();
|
||||
|
Loading…
x
Reference in New Issue
Block a user