2 Implements NULL authenticated variable services.
4 Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Library/AuthVariableLib.h>
10 #include <Library/DebugLib.h>
13 Initialization for authenticated varibale services.
14 If this initialization returns error status, other APIs will not work
15 and expect to be not called then.
17 @param[in] AuthVarLibContextIn Pointer to input auth variable lib context.
18 @param[out] AuthVarLibContextOut Pointer to output auth variable lib context.
20 @retval EFI_SUCCESS Function successfully executed.
21 @retval EFI_INVALID_PARAMETER If AuthVarLibContextIn == NULL or AuthVarLibContextOut == NULL.
22 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough resource.
23 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
28 AuthVariableLibInitialize (
29 IN AUTH_VAR_LIB_CONTEXT_IN
*AuthVarLibContextIn
,
30 OUT AUTH_VAR_LIB_CONTEXT_OUT
*AuthVarLibContextOut
34 // Do nothing, just return EFI_UNSUPPORTED.
36 return EFI_UNSUPPORTED
;
40 Process variable with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.
42 @param[in] VariableName Name of the variable.
43 @param[in] VendorGuid Variable vendor GUID.
44 @param[in] Data Data pointer.
45 @param[in] DataSize Size of Data.
46 @param[in] Attributes Attribute value of the variable.
48 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
49 defined by the Attributes.
50 @retval EFI_INVALID_PARAMETER Invalid parameter.
51 @retval EFI_WRITE_PROTECTED Variable is write-protected.
52 @retval EFI_OUT_OF_RESOURCES There is not enough resource.
53 @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS
54 set, but the AuthInfo does NOT pass the validation
55 check carried out by the firmware.
56 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
61 AuthVariableLibProcessVariable (
62 IN CHAR16
*VariableName
,
63 IN EFI_GUID
*VendorGuid
,
70 return EFI_UNSUPPORTED
;