]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.c
MdeModulePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
[mirror_edk2.git] / MdeModulePkg / Library / AuthVariableLibNull / AuthVariableLibNull.c
CommitLineData
b6477d82
SZ
1/** @file\r
2 Implements NULL authenticated variable services.\r
3\r
4073f85d 4Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
b6477d82
SZ
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <Library/AuthVariableLib.h>\r
16#include <Library/DebugLib.h>\r
17\r
18/**\r
19 Initialization for authenticated varibale services.\r
20 If this initialization returns error status, other APIs will not work\r
21 and expect to be not called then.\r
22\r
23 @param[in] AuthVarLibContextIn Pointer to input auth variable lib context.\r
24 @param[out] AuthVarLibContextOut Pointer to output auth variable lib context.\r
25\r
26 @retval EFI_SUCCESS Function successfully executed.\r
27 @retval EFI_INVALID_PARAMETER If AuthVarLibContextIn == NULL or AuthVarLibContextOut == NULL.\r
28 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough resource.\r
29 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.\r
30\r
31**/\r
32EFI_STATUS\r
33EFIAPI\r
34AuthVariableLibInitialize (\r
35 IN AUTH_VAR_LIB_CONTEXT_IN *AuthVarLibContextIn,\r
36 OUT AUTH_VAR_LIB_CONTEXT_OUT *AuthVarLibContextOut\r
37 )\r
38{\r
39 //\r
40 // Do nothing, just return EFI_UNSUPPORTED.\r
41 //\r
42 return EFI_UNSUPPORTED;\r
43}\r
44\r
45/**\r
4073f85d 46 Process variable with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.\r
b6477d82
SZ
47\r
48 @param[in] VariableName Name of the variable.\r
49 @param[in] VendorGuid Variable vendor GUID.\r
50 @param[in] Data Data pointer.\r
51 @param[in] DataSize Size of Data.\r
52 @param[in] Attributes Attribute value of the variable.\r
53\r
54 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as\r
55 defined by the Attributes.\r
56 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
57 @retval EFI_WRITE_PROTECTED Variable is write-protected.\r
58 @retval EFI_OUT_OF_RESOURCES There is not enough resource.\r
4073f85d 59 @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS\r
b6477d82
SZ
60 set, but the AuthInfo does NOT pass the validation\r
61 check carried out by the firmware.\r
62 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.\r
63\r
64**/\r
65EFI_STATUS\r
66EFIAPI\r
67AuthVariableLibProcessVariable (\r
68 IN CHAR16 *VariableName,\r
69 IN EFI_GUID *VendorGuid,\r
70 IN VOID *Data,\r
71 IN UINTN DataSize,\r
72 IN UINT32 Attributes\r
73 )\r
74{\r
75 ASSERT (FALSE);\r
76 return EFI_UNSUPPORTED;\r
77}\r