Skip to content

Commit

Permalink
Fixed the rogues?
Browse files Browse the repository at this point in the history
  • Loading branch information
kuqin12 committed Apr 26, 2024
1 parent b7f481c commit 04ae0ce
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
13 changes: 13 additions & 0 deletions MfciPkg/MfciDxe/MfciTargeting.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@

#include "MfciDxe.h"

/**
The strings of the names in the MFCI Policy name/value pairs
**/
CONST CHAR16 gPolicyBlobFieldName[MFCI_POLICY_FIELD_COUNT][MFCI_POLICY_FIELD_MAX_LEN] = {
L"Target\\Manufacturer",
L"Target\\Product",
L"Target\\SerialNumber",
L"Target\\OEM_01",
L"Target\\OEM_02",
L"Target\\Nonce", // this is nonce targeted by the binary policy blob
L"UEFI\\Policy"
};

CONST CHAR16 gPolicyTargetFieldVarNames[TARGET_POLICY_COUNT][MFCI_VAR_NAME_MAX_LENGTH] = {
MFCI_MANUFACTURER_VARIABLE_NAME,
MFCI_PRODUCT_VARIABLE_NAME,
Expand Down
10 changes: 1 addition & 9 deletions MfciPkg/Private/MfciPolicyFields.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@ typedef enum {
/**
The strings of the names in the MFCI Policy name/value pairs
**/
STATIC CONST CHAR16 gPolicyBlobFieldName[MFCI_POLICY_FIELD_COUNT][MFCI_POLICY_FIELD_MAX_LEN] = {
L"Target\\Manufacturer",
L"Target\\Product",
L"Target\\SerialNumber",
L"Target\\OEM_01",
L"Target\\OEM_02",
L"Target\\Nonce", // this is nonce targeted by the binary policy blob
L"UEFI\\Policy"
};
extern CONST CHAR16 gPolicyBlobFieldName[MFCI_POLICY_FIELD_COUNT][MFCI_POLICY_FIELD_MAX_LEN];

/**
A helper that maps static MFCI Policy targeting fields to their corresponding UEFI variable names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@

[Sources]
MfciPolicyParsingUnitTestApp.c
../../MfciDxe/MfciTargeting.c

[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
MfciPkg/MfciPkg.dec

[Guids]
gMfciVendorGuid ## CONSUMES

[Pcd]
gMfciPkgTokenSpaceGuid.PcdMfciPkcs7CertBufferXdr ## CONSUMES
gMfciPkgTokenSpaceGuid.PcdMfciPkcs7RequiredLeafEKU ## CONSUMES
Expand Down

0 comments on commit 04ae0ce

Please sign in to comment.