We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb1c9f8 commit 864d0c1Copy full SHA for 864d0c1
src/pki.c
@@ -428,8 +428,17 @@ EFI_STATUS PopulateAuthVar(
428
ReportErrorAndExit(L"'%s' is too small to be a valid certificate or signature list\n", Entry->Path);
429
430
// Set default attributes for authenticated variable
431
- if (Entry->Attrs == 0)
432
- Entry->Attrs = (Entry->Type == MOK) ? UEFI_VAR_NV_BS_AP : UEFI_VAR_NV_BS_RT_AT_AP;
+ switch(Entry->Type) {
+ case MOK:
433
+ Entry->Attrs = UEFI_VAR_NV_BS_AP;
434
+ break;
435
+ case PK:
436
+ Entry->Attrs = UEFI_VAR_NV_BS_RT_AT;
437
438
+ default:
439
+ Entry->Attrs = UEFI_VAR_NV_BS_RT_AT_AP;
440
441
+ }
442
443
// Check for signed ESL (PKCS#7 only)
444
AuthVar = (EFI_VARIABLE_AUTHENTICATION_2*)Entry->Buffer.Data;
0 commit comments