diff --git a/.ci/system-tests/container/rim_setup.sh b/.ci/system-tests/container/rim_setup.sh index 7d958b1e..ad8e666d 100644 --- a/.ci/system-tests/container/rim_setup.sh +++ b/.ci/system-tests/container/rim_setup.sh @@ -9,7 +9,7 @@ test=$2 tcgDir="/boot/tcg" propFile="/etc/hirs/tcg_boot.properties"; profileDir="/HIRS/.ci/system-tests/profiles/$profile" -defaultDir="$profile/default" +defaultDir="$profileDir/default" testDir="/HIRS/.ci/system-tests/profiles/$profile/$test" eventLog="$testDir"/"$profile"_"$test"_binary_bios_measurements swidDir="$testDir/swidtags" @@ -33,6 +33,7 @@ if [[ ! -f "$eventLog" ]]; then eventLog="$defaultDir"/"$profile"_default_binary_bios_measurements fi sed -i "s:tcg.event.file=.*:tcg.event.file=$eventLog:g" "$propFile" +echo "eventLog was $eventLog" # Step 2: Copy Base RIM files to the TCG folder # a: See if test specific swidtag folder exists, if not use the defualt folder @@ -59,15 +60,16 @@ pushd $rimDir > /dev/null fi popd > /dev/null -# echo "Contents of tcg swidtag folder $tcgDir/manifest/swidtag/ : $(ls $tcgDir/manifest/swidtag/)" -# echo "Contents of tcg rim folder tcgDir/manifest/rim/: $(ls $tcgDir/manifest/rim/)" + echo "Contents of tcg swidtag folder $tcgDir/manifest/swidtag/ : $(ls $tcgDir/manifest/swidtag/)" + echo "Contents of tcg rim folder tcgDir/manifest/rim/: $(ls $tcgDir/manifest/rim/)" #Step 4, run the setpcr script to make the TPM emulator hold values that correspond the binary_bios_measurement file # a: Check if a test specific setpcr.sh file exists. If not use the profiles default script if [[ ! -f $pcrScript ]]; then - pcrScript="$testDir/"$profile"_default_setpcrs.sh" + pcrScript="$profileDir/default/"$profile"_default_setpcrs.sh" fi sh $pcrScript; +echo "PCR script was $pcrScript" #tpm2_pcrlist -g sha256 # Done with rim_setup \ No newline at end of file diff --git a/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_oem.1.rimel b/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_oem.1.rimel new file mode 100644 index 00000000..9150f245 Binary files /dev/null and b/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_oem.1.rimel differ diff --git a/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_var.1.rimel b/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_var.1.rimel new file mode 100755 index 00000000..57424504 Binary files /dev/null and b/.ci/system-tests/profiles/laptop/badOemInstall/rims/laptop_badOemInstall_var.1.rimel differ diff --git a/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_oem.1.swidtag b/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_oem.1.swidtag new file mode 100644 index 00000000..d31ffcf2 --- /dev/null +++ b/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_oem.1.swidtag @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + yoxwnTQu9jI+5TSG6c2hR/xI2rpxzGA5f9fu6bq7KD0= + + + NUxJ8hcDDSvneXnwxCLHSbBa7hTs4MsuQDQI7/arITl3vMAYPYgmWI7uvKNqhdSvs4fzG5c5GZ+q +boe/0Lh7gkeX6rl12nxe6ormoRFqK6vuCxQLtSgyHAsoh4mI5evxMS9oijucJHJNOeVP1y2g9x+P +lfgyYJjvU6f1X6Zv4C4Qb3JrzB1vZaYbJNJD3tEMnvGPjh5X1FtMYkFldhM9jYf7PAHy8QJHh8x+ +b16n+OgE2pEOUGH/I+7xuk+fFtl+DYYSn8f9vwwqIRspXqTBI4uWoFu1xozw+yAPf7bKMYgQ1KYP +PvBgcXHR5UZWmfJdDDF09GWwkCh9EF+Wpmj3Bw== + + 2fdeb8e7d030a2209daa01861a964fedecf2bcc1 + + + p3WVYaRJG7EABjbAdqDYZXFSTV1nHY9Ol9A5+W8t5xwBXBryZCGWxERGr5AryKWPxd+qzjj+cFpx +xkM6N18jEhQIx/CEZePEJqpluBO5w2wTEOe7hqtMatqgDDMeDRxUuIpP8LGP00vh1wyDFFew90d9 +dvT3bcLvFh3a3ap9bTm6aBqPup5CXpzrwIU2wZfgkDytYVBm+8bHkMaUrgpNyM+5BAg2zl/Fqw0q +otjaGr7PzbH+urCvaGbKLMPoWkVLIgAE8Qw98HTfoYSFHC7VYQySrzIinaOBFSgViR72kHemH2lW +jDQeHiY0VIoPik/jVVIpjWe6zzeZ2S66Q/LmjQ== + AQAB + + + + + diff --git a/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_var.1.swidtag b/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_var.1.swidtag new file mode 100644 index 00000000..fa6c48bd --- /dev/null +++ b/.ci/system-tests/profiles/laptop/badOemInstall/swidtags/laptop_badOemInstall_var.1.swidtag @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + F5FruNNKqjgKSP6BOF7YUaBs9dSN8+HnYdpuYoBSWF8= + + + mXABBSi1haZdZZKg3OzdaLi0jZFp0A78YmFqMtaTdSTNBI/xwrzy1rIIdEc7JWqy5emAcfr2abgc +4AgOIkmcJgYD8AECcmWVloANi7uT03l4e4FMVmDL8l/Cu/93yt/+5MJeWcu3HQvwbIPkYqOqXTNu +kWVvLr8KG0v42t+TRn38O1+EDGwHlDL/705SYZwvNP12Z7+b7FKizUisn5WZC77mzJ1/9m49aiqn +mqf56NxmHuA3uhFShfjaIwoljWVLDCt3/fkrM9WSsk3tX7c8g+QhKn4ygqiMn7gI48HH0PGbbA5q +mg5c9Farqs0mbGR4WTvXjXioSFV5NYkcdoFfmQ== + + 2fdeb8e7d030a2209daa01861a964fedecf2bcc1 + + + p3WVYaRJG7EABjbAdqDYZXFSTV1nHY9Ol9A5+W8t5xwBXBryZCGWxERGr5AryKWPxd+qzjj+cFpx +xkM6N18jEhQIx/CEZePEJqpluBO5w2wTEOe7hqtMatqgDDMeDRxUuIpP8LGP00vh1wyDFFew90d9 +dvT3bcLvFh3a3ap9bTm6aBqPup5CXpzrwIU2wZfgkDytYVBm+8bHkMaUrgpNyM+5BAg2zl/Fqw0q +otjaGr7PzbH+urCvaGbKLMPoWkVLIgAE8Qw98HTfoYSFHC7VYQySrzIinaOBFSgViR72kHemH2lW +jDQeHiY0VIoPik/jVVIpjWe6zzeZ2S66Q/LmjQ== + AQAB + + + + + diff --git a/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_oem.1.rimel b/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_oem.1.rimel new file mode 100644 index 00000000..1fb646c6 Binary files /dev/null and b/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_oem.1.rimel differ diff --git a/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_var.1.rimel b/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_var.1.rimel new file mode 100644 index 00000000..eca388ec Binary files /dev/null and b/.ci/system-tests/profiles/laptop/badVarInstall/rims/laptop_badVarInstall_var.1.rimel differ diff --git a/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_oem.1.swidtag b/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_oem.1.swidtag new file mode 100644 index 00000000..613093d3 --- /dev/null +++ b/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_oem.1.swidtag @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + YwIGXKSKuII5sXcCa9fcwU6kr7u6HwTYHp58jfPJ5ic= + + + KiCrZx3Pe//AJv97y9a7/APfNB24AWhOMvd4mcxPzMdkz7XEKvi93CWHqvGXmzoLthHwy6O6pPEO +2vl8fgt8URZdx7FGRWNZMmOep91KsVvTnm64//BU+/4yvwvDSGwnDrZOWugeDYg8G+hAnVY/KFMb +WM+pyND8K6Qw0HkIDh3iitk/luE2TElGNZEx30VUa/5W4DxL2NYPMlquJYD4nZorqU/uEpSo2HED +T7qF9UV5tJWnrOclJH7DkCy/b1u+mcxmjfRmRemwBUHS3bbG11prgLwTMvV5jYJnDct+O/mc7CF3 +X0DP//wO4qziqK04kXLPZewB1wD2zknM35hORw== + + 2fdeb8e7d030a2209daa01861a964fedecf2bcc1 + + + p3WVYaRJG7EABjbAdqDYZXFSTV1nHY9Ol9A5+W8t5xwBXBryZCGWxERGr5AryKWPxd+qzjj+cFpx +xkM6N18jEhQIx/CEZePEJqpluBO5w2wTEOe7hqtMatqgDDMeDRxUuIpP8LGP00vh1wyDFFew90d9 +dvT3bcLvFh3a3ap9bTm6aBqPup5CXpzrwIU2wZfgkDytYVBm+8bHkMaUrgpNyM+5BAg2zl/Fqw0q +otjaGr7PzbH+urCvaGbKLMPoWkVLIgAE8Qw98HTfoYSFHC7VYQySrzIinaOBFSgViR72kHemH2lW +jDQeHiY0VIoPik/jVVIpjWe6zzeZ2S66Q/LmjQ== + AQAB + + + + + diff --git a/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_var.1.swidtag b/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_var.1.swidtag new file mode 100644 index 00000000..5bc8009c --- /dev/null +++ b/.ci/system-tests/profiles/laptop/badVarInstall/swidtags/laptop_badVarInstall_var.1.swidtag @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + jRkKkYQ4oDpP/H6AEj1/xwE1mI65v6jmAHIZFtSrO0Y= + + + h3bDGaljFAoof24cyU/L/ln3I419ov5iYm/I6Fvn4MHu7xfS85dSARkHarXn8yjegUSGrcGpCMbV +qAjZYK0Ljq95JETlVLc46/dAM98c/LOhE3WqcqMSvv7gMdOn2IsoRXfnUAnYNd7jGxnxlyGqS0UN +XDFXOi4rGY1km2DFGT7QHCRswy3GHhoPY8IocdrhaIN98aNFSEDzeLwIl8AtJHDmSEsmgxUCDMEL +1RvAbX1Fvjt6FE9gWbo/EY/Oj9cSNS+QXJR2CjEmsNe9KxUAMWVNpQJlXfGFZ2mJvjGmhKxfYYHN +EOb+D341sGCP4/TPH3wEQuTyQN4c/yNxwsIxpg== + + 2fdeb8e7d030a2209daa01861a964fedecf2bcc1 + + + p3WVYaRJG7EABjbAdqDYZXFSTV1nHY9Ol9A5+W8t5xwBXBryZCGWxERGr5AryKWPxd+qzjj+cFpx +xkM6N18jEhQIx/CEZePEJqpluBO5w2wTEOe7hqtMatqgDDMeDRxUuIpP8LGP00vh1wyDFFew90d9 +dvT3bcLvFh3a3ap9bTm6aBqPup5CXpzrwIU2wZfgkDytYVBm+8bHkMaUrgpNyM+5BAg2zl/Fqw0q +otjaGr7PzbH+urCvaGbKLMPoWkVLIgAE8Qw98HTfoYSFHC7VYQySrzIinaOBFSgViR72kHemH2lW +jDQeHiY0VIoPik/jVVIpjWe6zzeZ2S66Q/LmjQ== + AQAB + + + + + diff --git a/.ci/system-tests/rim_system_tests.sh b/.ci/system-tests/rim_system_tests.sh index 147efbf6..2f8f825b 100644 --- a/.ci/system-tests/rim_system_tests.sh +++ b/.ci/system-tests/rim_system_tests.sh @@ -16,4 +16,29 @@ clearAcaDb uploadTrustedCerts setPolicyEkPcFw setPlatformCerts "laptop" "varOsInstall" -provisionTpm2 "pass" \ No newline at end of file +setRims "laptop" "varOsInstall" +provisionTpm2 "pass" + +writeToLogs "### ACA RIM TEST 2: Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR ###" +clearAcaDb +uploadTrustedCerts +setPolicyEkPcFw +setPlatformCerts "laptop" "badOemInstall" +setRims "laptop" "badOemInstall" +provisionTpm2 "fail" + +writeToLogs "### ACA RIM TEST 3: Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement ###" +clearAcaDb +uploadTrustedCerts +setPolicyEkPcFw +setPlatformCerts "laptop" "badVarInstall" +setRims "laptop" "badVarInstall" +provisionTpm2 "fail" + +# Process Test Results, any single failure will send back a failed result. +if [[ $failedTests != 0 ]]; then + export TEST_STATUS=1; + echo "**** $failedTests out of $totalTests ACA RIM Tests Failed! ****" + else + echo "**** $totalTests ACA RIM Tests Passed! ****" +fi \ No newline at end of file