@@ -43,7 +43,6 @@ SBO001.001 Check Secure Boot default state (firmware)
43
43
[Documentation] This test aims to verify that Secure Boot state after
44
44
... flashing the platform with the Dasharo firmware is
45
45
... correct.
46
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO001.001 not supported
47
46
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO001.001 not supported
48
47
Power On
49
48
${setup_menu } = Enter Setup Menu Tianocore And Return Construction
@@ -60,7 +59,6 @@ SBO002.001 UEFI Secure Boot (Ubuntu)
60
59
[Documentation] This test verifies that Secure Boot can be enabled from
61
60
... boot menu and, after the DUT reset, it is seen from
62
61
... the OS.
63
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO002.001 not supported
64
62
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO002.001 not supported
65
63
66
64
# 1. Make sure that SB is enabled
@@ -97,7 +95,6 @@ SBO002.002 UEFI Secure Boot (Windows)
97
95
[Documentation] This test verifies that Secure Boot can be enabled from
98
96
... boot menu and, after the DUT reset, it is seen from
99
97
... the OS.
100
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO002.002 not supported
101
98
Skip If not ${TESTS_IN_WINDOWS_SUPPORT } SBO002.002 not supported
102
99
103
100
# 1. Make sure that SB is enabled
@@ -133,7 +130,6 @@ SBO002.002 UEFI Secure Boot (Windows)
133
130
SBO003.001 Attempt to boot file with the correct key from Boot Maintenance Manager (firmware)
134
131
[Documentation] This test verifies that Secure Boot allows booting a
135
132
... signed file with a correct key.
136
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO004.001 not supported
137
133
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO004.001 not supported
138
134
Power On
139
135
${sb_menu } = Enter Secure Boot Menu And Return Construction
@@ -158,7 +154,6 @@ SBO003.001 Attempt to boot file with the correct key from Boot Maintenance Manag
158
154
SBO004.001 Attempt to boot file without the key from Boot Maintenance Manager (firmware)
159
155
[Documentation] This test verifies that Secure Boot blocks booting a file
160
156
... without a key.
161
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO004.001 not supported
162
157
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO004.001 not supported
163
158
# 1. Make sure that SB is enabled
164
159
Power On
@@ -176,7 +171,6 @@ SBO004.001 Attempt to boot file without the key from Boot Maintenance Manager (f
176
171
SBO005.001 Attempt to boot file with the wrong-signed key from Boot Maintenance Manager (firmware)
177
172
[Documentation] This test verifies that Secure Boot disallows booting
178
173
... a signed file with a wrong-signed key.
179
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO005.001 not supported
180
174
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO005.001 not supported
181
175
# 1. Make sure that SB is enabled
182
176
Power On
@@ -194,7 +188,6 @@ SBO005.001 Attempt to boot file with the wrong-signed key from Boot Maintenance
194
188
SBO006.001 Reset Secure Boot Keys option availability (firmware)
195
189
[Documentation] This test verifies that the Reset Secure Boot Keys
196
190
... option is available
197
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO006.001 not supported
198
191
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO006.001 not supported
199
192
Power On
200
193
${setup_menu } = Enter Setup Menu Tianocore And Return Construction
@@ -210,7 +203,6 @@ SBO006.001 Reset Secure Boot Keys option availability (firmware)
210
203
SBO007.001 Attempt to boot the file after restoring keys to default (firmware)
211
204
[Documentation] This test verifies that restoring the keys to default
212
205
... removes any custom added certificates.
213
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO007.001 not supported
214
206
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO007.001 not supported
215
207
Power On
216
208
${sb_menu } = Enter Secure Boot Menu And Return Construction
@@ -249,7 +241,6 @@ SBO007.001 Attempt to boot the file after restoring keys to default (firmware)
249
241
SBO008.001 Attempt to enroll the key in the incorrect format (firmware)
250
242
[Documentation] This test verifies that it is impossible to load
251
243
... a certificate in the wrong file format.
252
- Skip If not ${TESTS_IN_FIRMWARE_SUPPORT } SBO008.001 not supported
253
244
Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO008.001 not supported
254
245
# 1. Make sure that SB is enabled
255
246
Power On
@@ -264,6 +255,124 @@ SBO008.001 Attempt to enroll the key in the incorrect format (firmware)
264
255
Select File In File Explorer cert_fake.der
265
256
Read From Terminal Until ERROR: Unsupported file type!
266
257
258
+ SBO009.001 Attempt to enroll and delete new PK key in OS (Ubuntu)
259
+ [Documentation] This test verifies that it is impossible to load
260
+ ... a certificate in the wrong file format.
261
+ Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO009.001 not supported
262
+ # 1. Make sure that SB is enabled and default keys enrolled.
263
+ Power On
264
+ ${sb_menu } = Enter Secure Boot Menu And Return Construction
265
+ ${advanced_menu } = Enter Advanced Secure Boot Keys Management And Return Construction ${sb_menu }
266
+ Reset To Default Secure Boot Keys ${advanced_menu }
267
+ # 2. Delete PK so that we can enroll a new one in OS
268
+ Enter PK Options And Delete PK ${advanced_menu }
269
+ # Let the flash operation be finished before resetting
270
+ Sleep 1
271
+ Tianocore Reset System
272
+ # Now boot to the OS
273
+ Boot System Or From Connected Disk ${ENV_ID_UBUNTU }
274
+ Login To Linux
275
+ Switch To Root User
276
+ # The magic starts here...
277
+ # Check if we are in SetupMode
278
+ ${out } = Read Secure Boot Variable SetupMode
279
+ ${setup_mode } = Convert To Integer ${out }
280
+ IF ${setup_mode } != 1 Fail Secure Boot not in setup mode
281
+ # Generate a new PK key and enroll the new PK. Setup mode should be cleared
282
+ Generate New PK Key Set
283
+ ${status } = Enroll New PK From OS
284
+ IF ${status } != 0 Fail Could not enroll new PK from OS
285
+ ${out } = Read Secure Boot Variable SetupMode
286
+ ${setup_mode } = Convert To Integer ${out }
287
+ IF ${setup_mode } != 0 Fail Secure Boot not in user mode
288
+ # Attempt to delete PK. We should get back to Setup Mode
289
+ ${status } = Enroll New PK From OS noPK.auth
290
+ IF ${status } != 0 Fail Could not delete PK from OS
291
+ ${out } = Read Secure Boot Variable SetupMode
292
+ ${setup_mode } = Convert To Integer ${out }
293
+ IF ${setup_mode } != 1 Fail Secure Boot not in setup mode
294
+
295
+ SBO009.002 Attempt to change existing PK key in OS (Ubuntu)
296
+ [Documentation] This test verifies that it is impossible to load
297
+ ... a certificate in the wrong file format.
298
+ Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO009.002 not supported
299
+ # 1. Make sure that SB is enabled and default keys enrolled.
300
+ Power On
301
+ ${sb_menu } = Enter Secure Boot Menu And Return Construction
302
+ ${advanced_menu } = Enter Advanced Secure Boot Keys Management And Return Construction ${sb_menu }
303
+ Reset To Default Secure Boot Keys ${advanced_menu }
304
+ # 2. Delete PK so that we can enroll a new one in OS
305
+ Enter PK Options And Delete PK ${advanced_menu }
306
+ # Let the flash operation be finished before resetting
307
+ Sleep 1
308
+ Tianocore Reset System
309
+ # Now boot to the OS
310
+ Boot System Or From Connected Disk ${ENV_ID_UBUNTU }
311
+ Login To Linux
312
+ Switch To Root User
313
+ # The magic starts here...
314
+ # Check if we are in SetupMode
315
+ ${out } = Read Secure Boot Variable SetupMode
316
+ ${setup_mode } = Convert To Integer ${out }
317
+ IF ${setup_mode } != 1 Fail Secure Boot not in setup mode
318
+ # Generate a new PK key and enroll the new PK. Setup mode should be cleared
319
+ Generate New PK Key Set
320
+ ${status } = Enroll New PK From OS
321
+ IF ${status } != 0 Fail Could not enroll new PK from OS
322
+ ${out } = Read Secure Boot Variable SetupMode
323
+ ${setup_mode } = Convert To Integer ${out }
324
+ IF ${setup_mode } != 0 Fail Secure Boot not in user mode
325
+ # Attempt to change PK.
326
+ Generate New PK Key Set newPK
327
+ # Sign the new PK signature list with existing PK
328
+ Execute Command In Terminal
329
+ ... sign-efi-sig-list -k PK.key -c PK.crt PK newPK.esl newPK.auth
330
+ ${status } = Enroll New PK From OS newPk.auth
331
+ IF ${status } != 0 Fail Could not change PK from OS
332
+ ${out } = Read Secure Boot Variable SetupMode
333
+ ${setup_mode } = Convert To Integer ${out }
334
+ IF ${setup_mode } != 0 Fail Secure Boot not in user mode
335
+
336
+ SBO009.003 Attempt to change PK with incorrectly signed PK in OS (Ubuntu)
337
+ [Documentation] This test verifies that it is impossible to load
338
+ ... a certificate in the wrong file format.
339
+ Skip If not ${TESTS_IN_UBUNTU_SUPPORT } SBO009.003 not supported
340
+ # 1. Make sure that SB is enabled and default keys enrolled.
341
+ Power On
342
+ ${sb_menu } = Enter Secure Boot Menu And Return Construction
343
+ ${advanced_menu } = Enter Advanced Secure Boot Keys Management And Return Construction ${sb_menu }
344
+ Reset To Default Secure Boot Keys ${advanced_menu }
345
+ # 2. Delete PK so that we can enroll a new one in OS
346
+ Enter PK Options And Delete PK ${advanced_menu }
347
+ # Let the flash operation be finished before resetting
348
+ Sleep 1
349
+ Tianocore Reset System
350
+ # Now boot to the OS
351
+ Boot System Or From Connected Disk ${ENV_ID_UBUNTU }
352
+ Login To Linux
353
+ Switch To Root User
354
+ # The magic starts here...
355
+ # Check if we are in SetupMode
356
+ ${out } = Read Secure Boot Variable SetupMode
357
+ ${setup_mode } = Convert To Integer ${out }
358
+ IF ${setup_mode } != 1 Fail Secure Boot not in setup mode
359
+ # Generate a new PK key and enroll the new PK. Setup mode should be cleared
360
+ Generate New PK Key Set
361
+ ${status } = Enroll New PK From OS
362
+ IF ${status } != 0 Fail Could not enroll new PK from OS
363
+ ${out } = Read Secure Boot Variable SetupMode
364
+ ${setup_mode } = Convert To Integer ${out }
365
+ IF ${setup_mode } != 0 Fail Secure Boot not in user mode
366
+ # Attempt to change PK but do not sign it with current PK.
367
+ Generate New PK Key Set newPK
368
+ ${status } = Enroll New PK From OS newPK.auth
369
+ IF ${status } == 0
370
+ Fail Unauthorized PK has been enrolled successfully
371
+ END
372
+ ${out } = Read Secure Boot Variable SetupMode
373
+ ${setup_mode } = Convert To Integer ${out }
374
+ IF ${setup_mode } != 0 Fail Secure Boot not in user mode
375
+
267
376
268
377
*** Keywords ***
269
378
Set Secure Boot State To Disabled
0 commit comments