]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h
SecurityPkg: AuthVariableLib: Cache UserPhysicalPresent in AuthVariableLib
[mirror_edk2.git] / SecurityPkg / Library / AuthVariableLib / AuthServiceInternal.h
index add05c21cce4fe424d9765fb2dc7ffc7fe471a94..ac7ea89a803866cb53cb620fe2772d100bfd31f2 100644 (file)
@@ -12,7 +12,7 @@
   may not be modified without authorization. If platform fails to protect these resources,\r
   the authentication service provided in this driver will be broken, and the behavior is undefined.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -86,8 +86,10 @@ typedef struct {
 #pragma pack()\r
 \r
 ///\r
-/// "certdb" variable stores the signer's certificates for non PK/KEK/DB/DBX\r
-/// variables with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.\r
+///  "certdb" variable stores the signer's certificates for non PK/KEK/DB/DBX\r
+/// variables with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS|EFI_VARIABLE_NON_VOLATILE set.\r
+///  "certdbv" variable stores the signer's certificates for non PK/KEK/DB/DBX\r
+/// variables with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set\r
 ///\r
 /// GUID: gEfiCertDbGuid\r
 ///\r
@@ -104,7 +106,8 @@ typedef struct {
 /// | AUTH_CERT_DB_DATA          | <-- Last CERT\r
 /// +----------------------------+\r
 ///\r
-#define EFI_CERT_DB_NAME        L"certdb"\r
+#define EFI_CERT_DB_NAME                 L"certdb"\r
+#define EFI_CERT_DB_VOLATILE_NAME        L"certdbv"\r
 \r
 #pragma pack(1)\r
 typedef struct {\r
@@ -125,11 +128,13 @@ extern UINT8    *mCertDbStore;
 extern UINT32   mMaxCertDbSize;\r
 extern UINT32   mPlatformMode;\r
 extern UINT8    mVendorKeyState;\r
+extern BOOLEAN  mUserPhysicalPresent;\r
 \r
 extern VOID     *mHashCtx;\r
 \r
 extern AUTH_VAR_LIB_CONTEXT_IN *mAuthVarLibContextIn;\r
 \r
+\r
 /**\r
   Process variable with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set\r
 \r
@@ -169,13 +174,15 @@ VerifyTimeBasedPayloadAndUpdate (
 \r
 /**\r
   Delete matching signer's certificates when deleting common authenticated\r
-  variable by corresponding VariableName and VendorGuid from "certdb".\r
+  variable by corresponding VariableName and VendorGuid from "certdb" or \r
+  "certdbv" according to authenticated variable attributes.\r
 \r
   @param[in]  VariableName   Name of authenticated Variable.\r
   @param[in]  VendorGuid     Vendor GUID of authenticated Variable.\r
+  @param[in]  Attributes        Attributes of authenticated variable.\r
 \r
   @retval  EFI_INVALID_PARAMETER Any input parameter is invalid.\r
-  @retval  EFI_NOT_FOUND         Fail to find "certdb" or matching certs.\r
+  @retval  EFI_NOT_FOUND         Fail to find "certdb"/"certdbv" or matching certs.\r
   @retval  EFI_OUT_OF_RESOURCES  The operation is failed due to lack of resources.\r
   @retval  EFI_SUCCESS           The operation is completed successfully.\r
 \r
@@ -183,7 +190,8 @@ VerifyTimeBasedPayloadAndUpdate (
 EFI_STATUS\r
 DeleteCertsFromDb (\r
   IN     CHAR16           *VariableName,\r
-  IN     EFI_GUID         *VendorGuid\r
+  IN     EFI_GUID         *VendorGuid,\r
+  IN     UINT32           Attributes\r
   );\r
 \r
 /**\r
@@ -317,7 +325,7 @@ ProcessVariable (
   IN     EFI_GUID                           *VendorGuid,\r
   IN     VOID                               *Data,\r
   IN     UINTN                              DataSize,\r
-  IN     UINT32                             Attributes OPTIONAL\r
+  IN     UINT32                             Attributes\r
   );\r
 \r
 /**\r