2 Implements NULL authenticated variable services.
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include <Library/AuthVariableLib.h>
16 #include <Library/DebugLib.h>
19 Initialization for authenticated varibale services.
20 If this initialization returns error status, other APIs will not work
21 and expect to be not called then.
23 @param[in] AuthVarLibContextIn Pointer to input auth variable lib context.
24 @param[out] AuthVarLibContextOut Pointer to output auth variable lib context.
26 @retval EFI_SUCCESS Function successfully executed.
27 @retval EFI_INVALID_PARAMETER If AuthVarLibContextIn == NULL or AuthVarLibContextOut == NULL.
28 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough resource.
29 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
34 AuthVariableLibInitialize (
35 IN AUTH_VAR_LIB_CONTEXT_IN
*AuthVarLibContextIn
,
36 OUT AUTH_VAR_LIB_CONTEXT_OUT
*AuthVarLibContextOut
40 // Do nothing, just return EFI_UNSUPPORTED.
42 return EFI_UNSUPPORTED
;
46 Process variable with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS/EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.
48 @param[in] VariableName Name of the variable.
49 @param[in] VendorGuid Variable vendor GUID.
50 @param[in] Data Data pointer.
51 @param[in] DataSize Size of Data.
52 @param[in] Attributes Attribute value of the variable.
54 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
55 defined by the Attributes.
56 @retval EFI_INVALID_PARAMETER Invalid parameter.
57 @retval EFI_WRITE_PROTECTED Variable is write-protected.
58 @retval EFI_OUT_OF_RESOURCES There is not enough resource.
59 @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
60 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS
61 set, but the AuthInfo does NOT pass the validation
62 check carried out by the firmware.
63 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
68 AuthVariableLibProcessVariable (
69 IN CHAR16
*VariableName
,
70 IN EFI_GUID
*VendorGuid
,
77 return EFI_UNSUPPORTED
;