@@ -35,7 +35,7 @@ TPM001.001 TPM Support (firmware)
35
35
Switch To Root User
36
36
Get Cbmem From Cloud
37
37
${out } = Execute Command In Terminal cbmem -L
38
- Should Contain ${out } TPM2 log
38
+ Should Contain Any ${out } TPM2 log TCPA log
39
39
40
40
TPM001.002 TPM Support (Ubuntu)
41
41
[Documentation] Check whether the TPM is initialized correctly and the
@@ -45,10 +45,7 @@ TPM001.002 TPM Support (Ubuntu)
45
45
Boot System Or From Connected Disk ubuntu
46
46
Login To Linux
47
47
Switch To Root User
48
- Detect Or Install Package tpm2-tools
49
- ${out } = Execute Command In Terminal tpm2_pcrread
50
- Should Contain ${out } sha1:
51
- Should Contain ${out } sha256:
48
+ Validate Any TPM
52
49
53
50
TPM001.003 TPM Support (Windows)
54
51
[Documentation] Check whether the TPM is initialized correctly and the
@@ -74,7 +71,7 @@ TPM002.001 Verify TPM version (firmware)
74
71
Switch To Root User
75
72
Get Cbmem From Cloud
76
73
${out } = Execute Command In Terminal cbmem -L
77
- Should Contain ${out } TPM2 log
74
+ Should Contain ${out } TPM2 log TCPA log
78
75
79
76
TPM002.002 Verify TPM version (Ubuntu)
80
77
[Documentation] This test aims to verify that the TPM version is
@@ -86,8 +83,8 @@ TPM002.002 Verify TPM version (Ubuntu)
86
83
Login To Linux
87
84
Switch To Root User
88
85
${out } = Execute Command In Terminal cat /sys/class/tpm/tpm0/tpm_version_major
89
- # TPM 2.0
90
- Should Contain ${out } 2
86
+ # TPM 2.0 and 1.2
87
+ Should Contain Any ${out } 1 2
91
88
92
89
TPM002.003 Verify TPM version (Windows)
93
90
[Documentation] This test aims to verify that the TPM version is
@@ -121,7 +118,7 @@ TPM003.002 Check TPM Physical Presence Interface (Ubuntu)
121
118
Login To Linux
122
119
Switch To Root User
123
120
${out } = Execute Command In Terminal cat /sys/class/tpm/tpm0/ppi/version
124
- Should Contain ${out } 1.3
121
+ Should Contain Any ${out } 1.2 1.3
125
122
126
123
TPM003.003 Check TPM Physical Presence Interface (Windows)
127
124
[Documentation] This test aims to verify that the TPM Physical Presence
@@ -138,3 +135,21 @@ TPM003.003 Check TPM Physical Presence Interface (Windows)
138
135
# Skip If not ${tpm_support} TPM003.004 not supported
139
136
# Skip If not ${tests_in_ubuntu_support} TPM003.004 not supported
140
137
# TODO: https://docs.dasharo.com/unified-test-documentation/dasharo-security/200-tpm-support/#tpm003004-change-active-pcr-banks-with-tpm-ppi-firmware
138
+
139
+
140
+ *** Keywords ***
141
+ Validate Any TPM
142
+ [Documentation] Checks for TPM major version, and validates it.
143
+ ${tpm_ver } = Execute Command In Terminal cat /sys/class/tpm/tpm0/tpm_version_major
144
+ IF '${tpm_ver } ' == '2 '
145
+ Detect Or Install Package tpm2-tools
146
+ ${out } = Execute Command In Terminal tpm2_pcrread
147
+ Should Contain ${out } sha1:
148
+ Should Contain ${out } sha256:
149
+ ELSE IF '${tpm_ver } ' == '1 '
150
+ Detect Or Install Package tpm-tools
151
+ ${out } = Execute Command In Terminal tpm_selftest
152
+ Should Contain ${out } TPM Test Results:
153
+ ELSE
154
+ Fail No valid TPM version available.
155
+ END
0 commit comments