mirror of https://github.com/acidanthera/audk.git
SecurityPkg: deprecate RpmcLib and VariableKeyLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594 There's no real usage of these two libraries. They're deprecated. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Nishant C Mistry <nishant.c.mistry@intel.com> Cc: Judah Vang <judah.vang@intel.com> Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
3c16e6fb97
commit
b2d76fdd42
|
@ -1,42 +0,0 @@
|
||||||
/** @file
|
|
||||||
Public definitions for the Replay Protected Monotonic Counter (RPMC) Library.
|
|
||||||
|
|
||||||
Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#ifndef _RPMC_LIB_H_
|
|
||||||
#define _RPMC_LIB_H_
|
|
||||||
|
|
||||||
#include <Uefi/UefiBaseType.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
Requests the monotonic counter from the designated RPMC counter.
|
|
||||||
|
|
||||||
@param[out] CounterValue A pointer to a buffer to store the RPMC value.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
|
|
||||||
@retval EFI_UNSUPPORTED The operation is un-supported.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
RequestMonotonicCounter (
|
|
||||||
OUT UINT32 *CounterValue
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Increments the monotonic counter in the SPI flash device by 1.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
|
|
||||||
@retval EFI_UNSUPPORTED The operation is un-supported.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
IncrementMonotonicCounter (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,59 +0,0 @@
|
||||||
/** @file
|
|
||||||
Public definitions for Variable Key Library.
|
|
||||||
|
|
||||||
Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#ifndef _VARIABLE_KEY_LIB_H_
|
|
||||||
#define _VARIABLE_KEY_LIB_H_
|
|
||||||
|
|
||||||
#include <Uefi/UefiBaseType.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves the key for integrity and/or confidentiality of variables.
|
|
||||||
|
|
||||||
@param[out] VariableKey A pointer to pointer for the variable key buffer.
|
|
||||||
@param[in,out] VariableKeySize The size in bytes of the variable key.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The variable key was returned.
|
|
||||||
@retval EFI_DEVICE_ERROR An error occurred while attempting to get the variable key.
|
|
||||||
@retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
|
|
||||||
@retval EFI_UNSUPPORTED The variable key is not supported in the current boot configuration.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
GetVariableKey (
|
|
||||||
OUT VOID **VariableKey,
|
|
||||||
IN OUT UINTN *VariableKeySize
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Regenerates the variable key.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The variable key was regenerated successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR An error occurred while attempting to regenerate the key.
|
|
||||||
@retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
|
|
||||||
@retval EFI_UNSUPPORTED Key regeneration is not supported in the current boot configuration.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
RegenerateVariableKey (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Locks the regenerate key interface.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The key interface was locked successfully.
|
|
||||||
@retval EFI_UNSUPPORTED Locking the key interface is not supported in the current boot configuration.
|
|
||||||
@retval Others An error occurred while attempting to lock the key interface.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
LockVariableKeyInterface (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,46 +0,0 @@
|
||||||
/** @file
|
|
||||||
NULL RpmcLib instance for build purpose.
|
|
||||||
|
|
||||||
Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/RpmcLib.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
Requests the monotonic counter from the designated RPMC counter.
|
|
||||||
|
|
||||||
@param[out] CounterValue A pointer to a buffer to store the RPMC value.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
|
|
||||||
@retval EFI_UNSUPPORTED The operation is un-supported.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
RequestMonotonicCounter (
|
|
||||||
OUT UINT32 *CounterValue
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Increments the monotonic counter in the SPI flash device by 1.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
|
|
||||||
@retval EFI_UNSUPPORTED The operation is un-supported.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
IncrementMonotonicCounter (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
## @file
|
|
||||||
# Provides Null version of RpmcLib for build purpose.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
#
|
|
||||||
##
|
|
||||||
|
|
||||||
[Defines]
|
|
||||||
INF_VERSION = 0x00010029
|
|
||||||
BASE_NAME = RpmcLibNull
|
|
||||||
FILE_GUID = FAE0BA22-92E2-4334-8F0F-96AFF9BAE360
|
|
||||||
MODULE_TYPE = BASE
|
|
||||||
VERSION_STRING = 1.0
|
|
||||||
LIBRARY_CLASS = RpmcLib
|
|
||||||
|
|
||||||
#
|
|
||||||
# The following information is for reference only and not required by the build tools.
|
|
||||||
#
|
|
||||||
# VALID_ARCHITECTURES = IA32 X64 Arm AArch64
|
|
||||||
#
|
|
||||||
|
|
||||||
[Sources]
|
|
||||||
RpmcLibNull.c
|
|
||||||
|
|
||||||
[Packages]
|
|
||||||
MdePkg/MdePkg.dec
|
|
||||||
SecurityPkg/SecurityPkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
|
||||||
BaseLib
|
|
||||||
DebugLib
|
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
/** @file
|
|
||||||
Null version of VariableKeyLib for build purpose. Don't use it in real product.
|
|
||||||
|
|
||||||
Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/VariableKeyLib.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves the key for integrity and/or confidentiality of variables.
|
|
||||||
|
|
||||||
@param[out] VariableKey A pointer to pointer for the variable key buffer.
|
|
||||||
@param[in,out] VariableKeySize The size in bytes of the variable key.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The variable key was returned.
|
|
||||||
@retval EFI_DEVICE_ERROR An error occurred while attempting to get the variable key.
|
|
||||||
@retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
|
|
||||||
@retval EFI_UNSUPPORTED The variable key is not supported in the current boot configuration.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
GetVariableKey (
|
|
||||||
OUT VOID **VariableKey,
|
|
||||||
IN OUT UINTN *VariableKeySize
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Regenerates the variable key.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The variable key was regenerated successfully.
|
|
||||||
@retval EFI_DEVICE_ERROR An error occurred while attempting to regenerate the key.
|
|
||||||
@retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
|
|
||||||
@retval EFI_UNSUPPORTED Key regeneration is not supported in the current boot configuration.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
RegenerateVariableKey (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Locks the regenerate key interface.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The key interface was locked successfully.
|
|
||||||
@retval EFI_UNSUPPORTED Locking the key interface is not supported in the current boot configuration.
|
|
||||||
@retval Others An error occurred while attempting to lock the key interface.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
LockVariableKeyInterface (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
## @file
|
|
||||||
# Provides Null version of VariableKeyLib for build only.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
#
|
|
||||||
##
|
|
||||||
|
|
||||||
[Defines]
|
|
||||||
INF_VERSION = 0x00010029
|
|
||||||
BASE_NAME = VariableKeyLibNull
|
|
||||||
FILE_GUID = 2B640ED8-1E6A-4516-9F1D-25910E59BC4A
|
|
||||||
MODULE_TYPE = BASE
|
|
||||||
VERSION_STRING = 1.0
|
|
||||||
LIBRARY_CLASS = VariableKeyLib
|
|
||||||
|
|
||||||
#
|
|
||||||
# The following information is for reference only and not required by the build tools.
|
|
||||||
#
|
|
||||||
# VALID_ARCHITECTURES = IA32 X64 Arm AArch64
|
|
||||||
#
|
|
||||||
|
|
||||||
[Sources]
|
|
||||||
VariableKeyLibNull.c
|
|
||||||
|
|
||||||
[Packages]
|
|
||||||
MdePkg/MdePkg.dec
|
|
||||||
SecurityPkg/SecurityPkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
|
||||||
BaseLib
|
|
||||||
DebugLib
|
|
||||||
|
|
|
@ -80,14 +80,6 @@
|
||||||
#
|
#
|
||||||
TcgStorageOpalLib|Include/Library/TcgStorageOpalLib.h
|
TcgStorageOpalLib|Include/Library/TcgStorageOpalLib.h
|
||||||
|
|
||||||
## @libraryclass Provides interfaces to access RPMC device.
|
|
||||||
#
|
|
||||||
RpmcLib|Include/Library/RpmcLib.h
|
|
||||||
|
|
||||||
## @libraryclass Provides interfaces to access variable root key.
|
|
||||||
#
|
|
||||||
VariableKeyLib|Include/Library/VariableKeyLib.h
|
|
||||||
|
|
||||||
## @libraryclass Provides interfaces about firmware TPM measurement.
|
## @libraryclass Provides interfaces about firmware TPM measurement.
|
||||||
#
|
#
|
||||||
TcgEventLogRecordLib|Include/Library/TcgEventLogRecordLib.h
|
TcgEventLogRecordLib|Include/Library/TcgEventLogRecordLib.h
|
||||||
|
|
|
@ -68,8 +68,6 @@
|
||||||
TcgStorageCoreLib|SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf
|
TcgStorageCoreLib|SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf
|
||||||
TcgStorageOpalLib|SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf
|
TcgStorageOpalLib|SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf
|
||||||
ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
|
ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
|
||||||
VariableKeyLib|SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf
|
|
||||||
RpmcLib|SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf
|
|
||||||
TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf
|
TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf
|
||||||
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
|
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
|
||||||
SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf
|
SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf
|
||||||
|
@ -264,8 +262,6 @@
|
||||||
#
|
#
|
||||||
# Variable Confidentiality & Integrity
|
# Variable Confidentiality & Integrity
|
||||||
#
|
#
|
||||||
SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf
|
|
||||||
SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf
|
|
||||||
SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf
|
SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue