// Init state of Del. State may change due to secure check\r
//\r
Del = FALSE;\r
- if ((InCustomMode() && mUserPhysicalPresent) || (mPlatformMode == SETUP_MODE && !IsPk)) {\r
+ if ((InCustomMode() && UserPhysicalPresent()) || (mPlatformMode == SETUP_MODE && !IsPk)) {\r
Payload = (UINT8 *) Data + AUTHINFO2_SIZE (Data);\r
PayloadSize = DataSize - AUTHINFO2_SIZE (Data);\r
if (PayloadSize == 0) {\r
}\r
\r
Status = EFI_SUCCESS;\r
- if (mPlatformMode == USER_MODE && !(InCustomMode() && mUserPhysicalPresent)) {\r
+ if (mPlatformMode == USER_MODE && !(InCustomMode() && UserPhysicalPresent())) {\r
//\r
// Time-based, verify against X509 Cert KEK.\r
//\r
&OrgVariableInfo\r
);\r
\r
- if ((!EFI_ERROR (Status)) && IsDeleteAuthVariable (OrgVariableInfo.Attributes, Data, DataSize, Attributes) && mUserPhysicalPresent) {\r
+ if ((!EFI_ERROR (Status)) && IsDeleteAuthVariable (OrgVariableInfo.Attributes, Data, DataSize, Attributes) && UserPhysicalPresent()) {\r
//\r
// Allow the delete operation of common authenticated variable at user physical presence.\r
//\r
return Status;\r
}\r
\r
- if (NeedPhysicallyPresent (VariableName, VendorGuid) && !mUserPhysicalPresent) {\r
+ if (NeedPhysicallyPresent (VariableName, VendorGuid) && !UserPhysicalPresent()) {\r
//\r
// This variable is protected, only physical present user could modify its value.\r
//\r
&AuthVariableInfo\r
);\r
\r
- if (EFI_ERROR(Status)) {\r
+ if (EFI_ERROR(Status) || (AuthVariableInfo.Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) == 0) {\r
Status = DeleteCertsFromDb(\r
VariableName,\r
&AuthVarGuid,\r