Skip to content

Commit dccb264

Browse files
committed
dasharo-security: measured-boot: Use Network Boot instead of Boot Lock
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
1 parent 1d211ef commit dccb264

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

dasharo-security/measured-boot.robot

+21-20
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ MBO003.001 Changing Secure Boot certificate changes only PCR-7
9999
END
100100
END
101101

102-
MBO004.001 Changing Dasharo Security settings changes only PCR-1
102+
MBO004.001 Changing Dasharo network boot settings changes only PCR-1
103103
[Documentation] Check if changes to Dasharo security settings influence PCR-1
104104
... value and only PCR-1
105105
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} Tests in firmware are not supported
106-
Skip If not ${DASHARO_SECURITY_MENU_SUPPORT} Tests in Dasharo Security Menu are not supported
106+
Skip If not ${DASHARO_NETWORKING_MENU_SUPPORT} Tests in Dasharo Networking Menu are not supported
107107
Power On
108108
Boot System Or From Connected Disk ubuntu
109109
Login To Linux
@@ -117,10 +117,10 @@ MBO004.001 Changing Dasharo Security settings changes only PCR-1
117117
Power On
118118
${menu}= Enter Setup Menu Tianocore And Return Construction
119119
${menu}= Enter Dasharo System Features ${menu}
120-
${menu}= Enter Dasharo Submenu ${menu} Dasharo Security Options
121-
${bios_lock_state}= Get Option State ${menu} Lock the BIOS boot medium
122-
${new_bios_lock_state}= Evaluate not ${bios_lock_state}
123-
Set Option State ${menu} Lock the BIOS boot medium ${new_bios_lock_state}
120+
${menu}= Enter Dasharo Submenu ${menu} Networking Options
121+
${network_boot_state}= Get Option State ${menu} Enable network boot
122+
${new_network_boot_state}= Evaluate not ${network_boot_state}
123+
Set Option State ${menu} Enable network boot ${new_network_boot_state}
124124
Save Changes And Reset
125125

126126
Boot System Or From Connected Disk ubuntu
@@ -129,7 +129,7 @@ MBO004.001 Changing Dasharo Security settings changes only PCR-1
129129
FOR ${pcr_hash} IN @{default_hashes}
130130
${pcr} ${hash}= Split String ${pcr_hash} separator=:
131131
${new_hash}= Execute Command In Terminal cat ${pcr}
132-
IF '/1' in '${pcr}'
132+
IF ${{'${pcr}'.endswith('/1')}}
133133
Should Not Be Equal ${hash} ${new_hash}
134134
ELSE
135135
Should Be Equal ${hash} ${new_hash}
@@ -166,7 +166,7 @@ MBO004.002 Changing Dasharo USB settings changes only PCR-1
166166
FOR ${pcr_hash} IN @{default_hashes}
167167
${pcr} ${hash}= Split String ${pcr_hash} separator=:
168168
${new_hash}= Execute Command In Terminal cat ${pcr}
169-
IF '/1' in '${pcr}'
169+
IF ${{'${pcr}'.endswith('/1')}}
170170
Should Not Be Equal ${hash} ${new_hash}
171171
ELSE
172172
Should Be Equal ${hash} ${new_hash}
@@ -202,7 +202,7 @@ MBO004.003 Changing Dasharo APU settings changes only PCR-1
202202
FOR ${pcr_hash} IN @{default_hashes}
203203
${pcr} ${hash}= Split String ${pcr_hash} separator=:
204204
${new_hash}= Execute Command In Terminal cat ${pcr}
205-
IF '/1' in '${pcr}'
205+
IF ${{'${pcr}'.endswith('/1')}}
206206
Should Not Be Equal ${hash} ${new_hash}
207207
ELSE
208208
Should Be Equal ${hash} ${new_hash}
@@ -232,8 +232,8 @@ MBO005.002 Identical configuration results in identical measurements
232232
[Documentation] Check if same configuration state results in same PCR
233233
... values regardless how this state was achieved
234234
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} Tests in firmware are not supported
235-
Skip If not ${DASHARO_SECURITY_MENU_SUPPORT} and not ${DASHARO_USB_MENU_SUPPORT}
236-
... Platform doesn't support neither Security or USB menu tests
235+
Skip If not ${DASHARO_NETWORKING_MENU_SUPPORT} and not ${DASHARO_USB_MENU_SUPPORT}
236+
... Platform doesn't support neither Networking or USB menu tests
237237
${default_hashes}= Get Default PCRs State
238238

239239
Restore Secure Boot Defaults
@@ -242,17 +242,18 @@ MBO005.002 Identical configuration results in identical measurements
242242

243243
${menu}= Enter Setup Menu Tianocore And Return Construction
244244
${menu}= Enter Dasharo System Features ${menu}
245-
IF ${DASHARO_SECURITY_MENU_SUPPORT}
245+
IF ${DASHARO_USB_MENU_SUPPORT}
246246
${menu}= Enter Dasharo Submenu ${menu} USB Configuration
247247
${option}= Set Variable Enable USB Mass Storage
248248
ELSE
249-
${menu}= Enter Dasharo Submenu ${menu} Dasharo Security Options
250-
${option}= Set Variable Lock the BIOS boot medium
249+
${menu}= Enter Dasharo Submenu ${menu} Networking Options
250+
${option}= Set Variable Enable network boot
251251
END
252252
${option_state}= Get Option State ${menu} ${option}
253253
${new_option_state}= Evaluate not ${option_state}
254254
Set Option State ${menu} ${option} ${new_option_state}
255255
Save Changes
256+
${menu}= Reenter Menu And Return Construction
256257
Set Option State ${menu} ${option} ${option_state}
257258
Save Changes And Reset
258259

@@ -269,7 +270,7 @@ MBO005.003 Identical configuration after reset results in identical measurements
269270
[Documentation] Check if same configuration state achieved by resetting
270271
... state to default results in same PCR values
271272
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} Tests in firmware are not supported
272-
Skip If not ${DASHARO_SECURITY_MENU_SUPPORT} and not ${DASHARO_USB_MENU_SUPPORT}
273+
Skip If not ${DASHARO_NETWORKING_MENU_SUPPORT} and not ${DASHARO_USB_MENU_SUPPORT}
273274
... Platform doesn't support neither Security or USB menu tests
274275
${default_hashes}= Get Default PCRs State
275276

@@ -279,12 +280,12 @@ MBO005.003 Identical configuration after reset results in identical measurements
279280

280281
${menu}= Enter Setup Menu Tianocore And Return Construction
281282
${menu}= Enter Dasharo System Features ${menu}
282-
IF ${DASHARO_SECURITY_MENU_SUPPORT}
283+
IF ${DASHARO_USB_MENU_SUPPORT}
283284
${menu}= Enter Dasharo Submenu ${menu} USB Configuration
284285
${option}= Set Variable Enable USB Mass Storage
285286
ELSE
286-
${menu}= Enter Dasharo Submenu ${menu} Dasharo Security Options
287-
${option}= Set Variable Lock the BIOS boot medium
287+
${menu}= Enter Dasharo Submenu ${menu} Networking Options
288+
${option}= Set Variable Enable network boot
288289
END
289290
${option_state}= Get Option State ${menu} ${option}
290291
${new_option_state}= Evaluate not ${option_state}
@@ -340,8 +341,8 @@ Get Index From List Regexp
340341
Get Default PCRs State
341342
[Documentation] First time this keyword is called it resets platform
342343
... configuration to default and then returns PCRs values. Next call
343-
... return values measured in first call.
344-
IF not ${TESTS_IN_UBUNTU_SUPPORT} Fail
344+
... return values measured in first call (remembers value in whole
345+
... Test Suite).
345346
${default_pcr_state}= Get Variable Value $DEFAULT_PCR_STATE_SUITE
346347
IF ${default_pcr_state} is ${NONE}
347348
Restore Secure Boot Defaults

0 commit comments

Comments
 (0)