]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Include/Library/VariableKeyLib.h
UefiPayloadPkg: Add PCI root bridge info hob support for SBL
[mirror_edk2.git] / SecurityPkg / Include / Library / VariableKeyLib.h
CommitLineData
5042ee43
JW
1/** @file\r
2 Public definitions for Variable Key Library.\r
3\r
4Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#ifndef _VARIABLE_KEY_LIB_H_\r
10#define _VARIABLE_KEY_LIB_H_\r
11\r
12#include <Uefi/UefiBaseType.h>\r
13\r
14/**\r
15 Retrieves the key for integrity and/or confidentiality of variables.\r
16\r
17 @param[out] VariableKey A pointer to pointer for the variable key buffer.\r
18 @param[in,out] VariableKeySize The size in bytes of the variable key.\r
19\r
20 @retval EFI_SUCCESS The variable key was returned.\r
21 @retval EFI_DEVICE_ERROR An error occurred while attempting to get the variable key.\r
22 @retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.\r
23 @retval EFI_UNSUPPORTED The variable key is not supported in the current boot configuration.\r
24**/\r
25EFI_STATUS\r
26EFIAPI\r
27GetVariableKey (\r
28 OUT VOID **VariableKey,\r
29 IN OUT UINTN *VariableKeySize\r
30 );\r
31\r
32/**\r
33 Regenerates the variable key.\r
34\r
35 @retval EFI_SUCCESS The variable key was regenerated successfully.\r
36 @retval EFI_DEVICE_ERROR An error occurred while attempting to regenerate the key.\r
37 @retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.\r
38 @retval EFI_UNSUPPORTED Key regeneration is not supported in the current boot configuration.\r
39**/\r
40EFI_STATUS\r
41EFIAPI\r
42RegenerateVariableKey (\r
43 VOID\r
44 );\r
45\r
46/**\r
47 Locks the regenerate key interface.\r
48\r
49 @retval EFI_SUCCESS The key interface was locked successfully.\r
50 @retval EFI_UNSUPPORTED Locking the key interface is not supported in the current boot configuration.\r
51 @retval Others An error occurred while attempting to lock the key interface.\r
52**/\r
53EFI_STATUS\r
54EFIAPI\r
55LockVariableKeyInterface (\r
56 VOID\r
57 );\r
58\r
59#endif\r
60\r