9#ifndef _AUTH_VARIABLE_LIB_H_
10#define _AUTH_VARIABLE_LIB_H_
17#define AUTHINFO_SIZE ((OFFSET_OF (EFI_VARIABLE_AUTHENTICATION, AuthInfo)) +\
18 (OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData)) + \
19 sizeof (EFI_CERT_BLOCK_RSA_2048_SHA256))
21#define AUTHINFO2_SIZE(VarAuth2) ((OFFSET_OF (EFI_VARIABLE_AUTHENTICATION_2, AuthInfo)) +\
22 (UINTN) ((EFI_VARIABLE_AUTHENTICATION_2 *) (VarAuth2))->AuthInfo.Hdr.dwLength)
24#define OFFSET_OF_AUTHINFO2_CERT_DATA ((OFFSET_OF (EFI_VARIABLE_AUTHENTICATION_2, AuthInfo)) +\
25 (OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData)))
34 UINT64 MonotonicCount;
59 IN CHAR16 *VariableName,
85 IN CHAR16 *VariableName,
124 OUT VOID **ScratchBuffer
149 IN UINT32 Attributes,
166#define AUTH_VAR_LIB_CONTEXT_IN_STRUCT_VERSION 0x01
177 UINTN MaxAuthVariableSize;
186#define AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION 0x01
195 UINTN AuthVarEntryCount;
199 VOID ***AddressPointer;
200 UINTN AddressPointerCount;
247 IN CHAR16 *VariableName,
EFI_STATUS(EFIAPI * AUTH_VAR_LIB_FIND_VARIABLE)(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT AUTH_VARIABLE_INFO *AuthVariableInfo)
EFI_STATUS EFIAPI AuthVariableLibInitialize(IN AUTH_VAR_LIB_CONTEXT_IN *AuthVarLibContextIn, OUT AUTH_VAR_LIB_CONTEXT_OUT *AuthVarLibContextOut)
EFI_STATUS(EFIAPI * AUTH_VAR_LIB_FIND_NEXT_VARIABLE)(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT AUTH_VARIABLE_INFO *AuthVariableInfo)
EFI_STATUS(EFIAPI * AUTH_VAR_LIB_UPDATE_VARIABLE)(IN AUTH_VARIABLE_INFO *AuthVariableInfo)
BOOLEAN(EFIAPI * AUTH_VAR_LIB_CHECK_REMAINING_SPACE)(IN UINT32 Attributes,...)
EFI_STATUS(EFIAPI * AUTH_VAR_LIB_GET_SCRATCH_BUFFER)(IN OUT UINTN *ScratchBufferSize, OUT VOID **ScratchBuffer)
EFI_STATUS EFIAPI AuthVariableLibProcessVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, IN UINT32 Attributes)
BOOLEAN(EFIAPI * AUTH_VAR_LIB_AT_RUNTIME)(VOID)
EFI_STATUS FindVariable(IN CONST CHAR16 *VariableName, IN CONST EFI_GUID *VendorGuid, OUT VARIABLE_POINTER_TRACK *PtrTrack, OUT VARIABLE_STORE_INFO *StoreInfo)
EFI_STATUS UpdateVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, IN UINT32 Attributes OPTIONAL, IN UINT32 KeyIndex OPTIONAL, IN UINT64 MonotonicCount OPTIONAL, IN OUT VARIABLE_POINTER_TRACK *CacheVariable, IN EFI_TIME *TimeStamp OPTIONAL)
BOOLEAN EFIAPI CheckRemainingSpaceForConsistency(IN UINT32 Attributes,...)