]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[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
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
b6477d82
SZ
6\r
7**/\r
8\r
9#include <Library/AuthVariableLib.h>\r
10#include <Library/DebugLib.h>\r
11\r
12/**\r
13 Initialization for authenticated varibale services.\r
14 If this initialization returns error status, other APIs will not work\r
15 and expect to be not called then.\r
16\r
17 @param[in] AuthVarLibContextIn Pointer to input auth variable lib context.\r
18 @param[out] AuthVarLibContextOut Pointer to output auth variable lib context.\r
19\r
20 @retval EFI_SUCCESS Function successfully executed.\r
21 @retval EFI_INVALID_PARAMETER If AuthVarLibContextIn == NULL or AuthVarLibContextOut == NULL.\r
22 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough resource.\r
23 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.\r
24\r
25**/\r
26EFI_STATUS\r
27EFIAPI\r
28AuthVariableLibInitialize (\r
29 IN AUTH_VAR_LIB_CONTEXT_IN *AuthVarLibContextIn,\r
30 OUT AUTH_VAR_LIB_CONTEXT_OUT *AuthVarLibContextOut\r
31 )\r
32{\r
33 //\r
34 // Do nothing, just return EFI_UNSUPPORTED.\r
35 //\r
36 return EFI_UNSUPPORTED;\r
37}\r
38\r
39/**\r
4073f85d 40 Process variable with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.\r
b6477d82
SZ
41\r
42 @param[in] VariableName Name of the variable.\r
43 @param[in] VendorGuid Variable vendor GUID.\r
44 @param[in] Data Data pointer.\r
45 @param[in] DataSize Size of Data.\r
46 @param[in] Attributes Attribute value of the variable.\r
47\r
48 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as\r
49 defined by the Attributes.\r
50 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
51 @retval EFI_WRITE_PROTECTED Variable is write-protected.\r
52 @retval EFI_OUT_OF_RESOURCES There is not enough resource.\r
4073f85d 53 @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS\r
b6477d82
SZ
54 set, but the AuthInfo does NOT pass the validation\r
55 check carried out by the firmware.\r
56 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.\r
57\r
58**/\r
59EFI_STATUS\r
60EFIAPI\r
61AuthVariableLibProcessVariable (\r
62 IN CHAR16 *VariableName,\r
63 IN EFI_GUID *VendorGuid,\r
64 IN VOID *Data,\r
65 IN UINTN DataSize,\r
66 IN UINT32 Attributes\r
67 )\r
68{\r
69 ASSERT (FALSE);\r
70 return EFI_UNSUPPORTED;\r
71}\r