summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
diff options
context:
space:
mode:
authorchenc2 <chen.a.chen@intel.com>2017-09-26 08:44:19 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2017-09-28 15:02:00 +0800
commit85974aef1332d2d8f480f121875dc57795220dd1 (patch)
treebf60015a6efa2e99401e7751a7aab96caec8d6e9 /SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
parent5db417ed2522367290c365831f9d6628d31c346c (diff)
downloadedk2-85974aef1332d2d8f480f121875dc57795220dd1.zip
edk2-85974aef1332d2d8f480f121875dc57795220dd1.tar.gz
edk2-85974aef1332d2d8f480f121875dc57795220dd1.tar.bz2
SecurityPkg/SecureBootConfigImpl.c: Secure Boot DBX UI Enhancement
Use 2-level format to display signature list and signature data. Support batch delete operation to delete signature list or signature data. Display more useful information for each signature data. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Zhang Chao B <chao.b.zhang@intel.com> Cc: Long Qin <qin.long@intel.com> Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Zhang Chao B <chao.b.zhang@intel.com>
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h')
-rw-r--r--SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
index 75b18f1..52ad91b 100644
--- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
+++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
@@ -112,6 +112,23 @@ typedef struct {
UINT8 FileType;
} SECUREBOOT_FILE_CONTEXT;
+#define SECUREBOOT_FREE_NON_NULL(Pointer) \
+ do { \
+ if ((Pointer) != NULL) { \
+ FreePool((Pointer)); \
+ (Pointer) = NULL; \
+ } \
+ } while (FALSE)
+
+#define SECUREBOOT_FREE_NON_OPCODE(Handle) \
+ do{ \
+ if ((Handle) != NULL) { \
+ HiiFreeOpCodeHandle((Handle)); \
+ } \
+ } while (FALSE)
+
+#define SIGNATURE_DATA_COUNTS(List) \
+ (((List)->SignatureListSize - sizeof(EFI_SIGNATURE_LIST) - (List)->SignatureHeaderSize) / (List)->SignatureSize)
//
// We define another format of 5th directory entry: security directory
@@ -134,6 +151,19 @@ typedef struct {
EFI_DEVICE_PATH_PROTOCOL End;
} HII_VENDOR_DEVICE_PATH;
+typedef enum {
+ VARIABLE_DB,
+ VARIABLE_DBX,
+ VARIABLE_DBT,
+ VARIABLE_MAX
+} CURRENT_VARIABLE_NAME;
+
+typedef enum {
+ DELETE_SIGNATURE_LIST_ALL,
+ DELETE_SIGNATURE_LIST_ONE,
+ DELETE_SIGNATURE_DATA
+}SIGNATURE_DELETE_TYPE;
+
typedef struct {
UINTN Signature;
@@ -144,6 +174,11 @@ typedef struct {
SECUREBOOT_FILE_CONTEXT *FileContext;
EFI_GUID *SignatureGUID;
+
+ CURRENT_VARIABLE_NAME VariableName; // The variable name we are processing.
+ UINT32 ListCount; // Record current variable has how many signature list.
+ UINTN ListIndex; // Record which signature list is processing.
+ BOOLEAN *CheckArray; // Record whcih siganture data checked.
} SECUREBOOT_CONFIG_PRIVATE_DATA;
extern SECUREBOOT_CONFIG_PRIVATE_DATA mSecureBootConfigPrivateDateTemplate;