mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-20 17:52:47 +00:00
initial Platfom Cert test
This commit is contained in:
parent
ffc40994a0
commit
825abaebe4
29
.ci/system-tests/platform_cert_tests.sh
Normal file
29
.ci/system-tests/platform_cert_tests.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
#########################################################################################
|
||||
# HIRS Platform Certificate System Tests
|
||||
#
|
||||
#########################################################################################
|
||||
testResult=false
|
||||
totalTests=0;
|
||||
failedTests=0;
|
||||
|
||||
# Start ACA Platform Certificate Tests
|
||||
# provision_tpm takes 1 parameter (the expected result): "pass" or "fail"
|
||||
# Note that the aca_policy_tests have already run several Platform Certificate system tests
|
||||
|
||||
writeToLogs "### ACA PLATFORM CERTIFICATE TEST 1: Test a delta Platform Certificate that adds a new memory component ###"
|
||||
setPolicyEkPc
|
||||
setPlatformCerts "laptop" "deltaPlatMem"
|
||||
provisionTpm2 "pass"
|
||||
|
||||
writeToLogs "### ACA PLATFORM CERTIFICATE TEST 2: Test a Platform Certificate that is missing a memory component ###"
|
||||
setPlatformCerts "laptop" "platCertLight"
|
||||
provisionTpm2 "pass"
|
||||
|
||||
# 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 Platform Certificate Tests Failed! ****"
|
||||
else
|
||||
echo "**** $totalTests Platform Certificate Tests Passed! ****"
|
||||
fi
|
6
.ci/system-tests/profiles/laptop/deltaPlatMem/README.md
Normal file
6
.ci/system-tests/profiles/laptop/deltaPlatMem/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
HIRS system test:
|
||||
|
||||
Category: Platform Certificate
|
||||
|
||||
Test Description: Test for a delta platform certificate illustrating a memory component addition (1 add)
|
||||
|
@ -0,0 +1,24 @@
|
||||
{
|
||||
"PLATFORM": {
|
||||
"PLATFORMMANUFACTURERSTR": "Dell Inc.","PLATFORMMODEL": "Latitude 5580","PLATFORMVERSION": "Not Specified","PLATFORMSERIAL": "56LMWD2"
|
||||
},
|
||||
"COMPONENTS": [
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00060001"
|
||||
},"MANUFACTURER": "80AD000080AD","MODEL": "HMA81GS6AFR8N-UH","FIELDREPLACEABLE": "true","SERIAL": "29AC274B","REVISION": "01172200","STATUS": "added"
|
||||
}
|
||||
],
|
||||
"PROPERTIES": [
|
||||
{
|
||||
"NAME": "uname -r",
|
||||
"VALUE": "4.14.165-133.209.amzn2.x86_64"
|
||||
},
|
||||
{
|
||||
"NAME": "OS Release",
|
||||
"VALUE": "CentOS Linux 7 (Core)"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
{
|
||||
|
||||
"PLATFORM": {
|
||||
"PLATFORMMANUFACTURERSTR": "Dell Inc.","PLATFORMMODEL": "Latitude 5580","PLATFORMVERSION": "Not Specified","PLATFORMSERIAL": "56LMWD2"
|
||||
},
|
||||
"COMPONENTS": [
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00020001"
|
||||
},"MANUFACTURER": "Dell Inc.","MODEL": "10","SERIAL": "56LMWD2"
|
||||
},
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00030003"
|
||||
},"MANUFACTURER": "Dell Inc.","MODEL": "08T986","FIELDREPLACEABLE": "true","SERIAL": "/56LMWD2/TW320707A30298/","REVISION": "A00"
|
||||
},
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00130003"
|
||||
},"MANUFACTURER": "Dell Inc.","MODEL": "Not Specified","REVISION": "1.5.3"
|
||||
},
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00010002"
|
||||
},"MANUFACTURER": "Intel(R) Corporation","MODEL": "198","FIELDREPLACEABLE": "true","SERIAL": "To Be Filled By O.E.M.","REVISION": "Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz"
|
||||
},
|
||||
{
|
||||
"COMPONENTCLASS": {
|
||||
"COMPONENTCLASSREGISTRY": "2.23.133.18.3.1",
|
||||
"COMPONENTCLASSVALUE": "00060001"
|
||||
},"MANUFACTURER": "80AD000080AD","MODEL": "HMA81GS6AFR8N-UH","FIELDREPLACEABLE": "true","SERIAL": "29AC2764","REVISION": "01172200"
|
||||
}
|
||||
],
|
||||
"PROPERTIES": [
|
||||
{
|
||||
"NAME": "uname -r",
|
||||
"VALUE": "4.14.165-133.209.amzn2.x86_64"
|
||||
},
|
||||
{
|
||||
"NAME": "OS Release",
|
||||
"VALUE": "CentOS Linux 7 (Core)"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
8
.ci/system-tests/profiles/laptop/platCertLight/README.md
Normal file
8
.ci/system-tests/profiles/laptop/platCertLight/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
HIRS system test:
|
||||
|
||||
Category: Platform Certificate
|
||||
|
||||
Test Description: Test for a delta platform certificate illustrating a certificate that contains a component that does not match a component on the device.
|
||||
|
||||
Expected Test result: fail
|
||||
|
Binary file not shown.
@ -37,6 +37,8 @@ docker exec $tpm2_container /HIRS/.ci/setup/setup_tpm2provisioner.sh
|
||||
echo "******** Setup Complete Begin HIRS System Tests ******** "
|
||||
|
||||
source aca_policy_tests.sh
|
||||
source platform_cert_tests.sh
|
||||
|
||||
|
||||
echo "******** HIRS System Tests Complete ******** "
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user