]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: deprecate RpmcLib and VariableKeyLib
authorJian J Wang <jian.j.wang@intel.com>
Thu, 15 Dec 2022 03:02:23 +0000 (11:02 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 21 Dec 2022 05:49:48 +0000 (05:49 +0000)
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>
SecurityPkg/Include/Library/RpmcLib.h [deleted file]
SecurityPkg/Include/Library/VariableKeyLib.h [deleted file]
SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c [deleted file]
SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf [deleted file]
SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.c [deleted file]
SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf [deleted file]
SecurityPkg/SecurityPkg.dec
SecurityPkg/SecurityPkg.dsc

diff --git a/SecurityPkg/Include/Library/RpmcLib.h b/SecurityPkg/Include/Library/RpmcLib.h
deleted file mode 100644 (file)
index df4ba34..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/** @file\r
-  Public definitions for the Replay Protected Monotonic Counter (RPMC) Library.\r
-\r
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef _RPMC_LIB_H_\r
-#define _RPMC_LIB_H_\r
-\r
-#include <Uefi/UefiBaseType.h>\r
-\r
-/**\r
-  Requests the monotonic counter from the designated RPMC counter.\r
-\r
-  @param[out]   CounterValue            A pointer to a buffer to store the RPMC value.\r
-\r
-  @retval       EFI_SUCCESS             The operation completed successfully.\r
-  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
-  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RequestMonotonicCounter (\r
-  OUT UINT32  *CounterValue\r
-  );\r
-\r
-/**\r
-  Increments the monotonic counter in the SPI flash device by 1.\r
-\r
-  @retval       EFI_SUCCESS             The operation completed successfully.\r
-  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
-  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-IncrementMonotonicCounter (\r
-  VOID\r
-  );\r
-\r
-#endif\r
diff --git a/SecurityPkg/Include/Library/VariableKeyLib.h b/SecurityPkg/Include/Library/VariableKeyLib.h
deleted file mode 100644 (file)
index 561ebad..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/** @file\r
-  Public definitions for Variable Key Library.\r
-\r
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef _VARIABLE_KEY_LIB_H_\r
-#define _VARIABLE_KEY_LIB_H_\r
-\r
-#include <Uefi/UefiBaseType.h>\r
-\r
-/**\r
-  Retrieves the key for integrity and/or confidentiality of variables.\r
-\r
-  @param[out]     VariableKey         A pointer to pointer for the variable key buffer.\r
-  @param[in,out]  VariableKeySize     The size in bytes of the variable key.\r
-\r
-  @retval       EFI_SUCCESS             The variable key was returned.\r
-  @retval       EFI_DEVICE_ERROR        An error occurred while attempting to get the variable key.\r
-  @retval       EFI_ACCESS_DENIED       The function was invoked after locking the key interface.\r
-  @retval       EFI_UNSUPPORTED         The variable key is not supported in the current boot configuration.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-GetVariableKey (\r
-  OUT VOID       **VariableKey,\r
-  IN  OUT UINTN  *VariableKeySize\r
-  );\r
-\r
-/**\r
-  Regenerates the variable key.\r
-\r
-  @retval       EFI_SUCCESS             The variable key was regenerated successfully.\r
-  @retval       EFI_DEVICE_ERROR        An error occurred while attempting to regenerate the key.\r
-  @retval       EFI_ACCESS_DENIED       The function was invoked after locking the key interface.\r
-  @retval       EFI_UNSUPPORTED         Key regeneration is not supported in the current boot configuration.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RegenerateVariableKey (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  Locks the regenerate key interface.\r
-\r
-  @retval       EFI_SUCCESS             The key interface was locked successfully.\r
-  @retval       EFI_UNSUPPORTED         Locking the key interface is not supported in the current boot configuration.\r
-  @retval       Others                  An error occurred while attempting to lock the key interface.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-LockVariableKeyInterface (\r
-  VOID\r
-  );\r
-\r
-#endif\r
diff --git a/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c b/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c
deleted file mode 100644 (file)
index 792e482..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/** @file\r
-  NULL RpmcLib instance for build purpose.\r
-\r
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include <Library/DebugLib.h>\r
-#include <Library/RpmcLib.h>\r
-\r
-/**\r
-  Requests the monotonic counter from the designated RPMC counter.\r
-\r
-  @param[out]   CounterValue            A pointer to a buffer to store the RPMC value.\r
-\r
-  @retval       EFI_SUCCESS             The operation completed successfully.\r
-  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
-  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RequestMonotonicCounter (\r
-  OUT UINT32  *CounterValue\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-/**\r
-  Increments the monotonic counter in the SPI flash device by 1.\r
-\r
-  @retval       EFI_SUCCESS             The operation completed successfully.\r
-  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
-  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-IncrementMonotonicCounter (\r
-  VOID\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return EFI_UNSUPPORTED;\r
-}\r
diff --git a/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf b/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf
deleted file mode 100644 (file)
index 500edfa..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-## @file\r
-#  Provides Null version of RpmcLib for build purpose.\r
-#\r
-#  Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010029\r
-  BASE_NAME                      = RpmcLibNull\r
-  FILE_GUID                      = FAE0BA22-92E2-4334-8F0F-96AFF9BAE360\r
-  MODULE_TYPE                    = BASE\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = RpmcLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 Arm AArch64\r
-#\r
-\r
-[Sources]\r
-  RpmcLibNull.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  SecurityPkg/SecurityPkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  DebugLib\r
-\r
diff --git a/SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.c b/SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.c
deleted file mode 100644 (file)
index a08def7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/** @file\r
-  Null version of VariableKeyLib for build purpose. Don't use it in real product.\r
-\r
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-#include <Library/DebugLib.h>\r
-#include <Library/VariableKeyLib.h>\r
-\r
-/**\r
-  Retrieves the key for integrity and/or confidentiality of variables.\r
-\r
-  @param[out]     VariableKey         A pointer to pointer for the variable key buffer.\r
-  @param[in,out]  VariableKeySize     The size in bytes of the variable key.\r
-\r
-  @retval       EFI_SUCCESS             The variable key was returned.\r
-  @retval       EFI_DEVICE_ERROR        An error occurred while attempting to get the variable key.\r
-  @retval       EFI_ACCESS_DENIED       The function was invoked after locking the key interface.\r
-  @retval       EFI_UNSUPPORTED         The variable key is not supported in the current boot configuration.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-GetVariableKey (\r
-  OUT VOID       **VariableKey,\r
-  IN  OUT UINTN  *VariableKeySize\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-/**\r
-  Regenerates the variable key.\r
-\r
-  @retval       EFI_SUCCESS             The variable key was regenerated successfully.\r
-  @retval       EFI_DEVICE_ERROR        An error occurred while attempting to regenerate the key.\r
-  @retval       EFI_ACCESS_DENIED       The function was invoked after locking the key interface.\r
-  @retval       EFI_UNSUPPORTED         Key regeneration is not supported in the current boot configuration.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RegenerateVariableKey (\r
-  VOID\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-/**\r
-  Locks the regenerate key interface.\r
-\r
-  @retval       EFI_SUCCESS             The key interface was locked successfully.\r
-  @retval       EFI_UNSUPPORTED         Locking the key interface is not supported in the current boot configuration.\r
-  @retval       Others                  An error occurred while attempting to lock the key interface.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-LockVariableKeyInterface (\r
-  VOID\r
-  )\r
-{\r
-  ASSERT (FALSE);\r
-  return EFI_UNSUPPORTED;\r
-}\r
diff --git a/SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf b/SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf
deleted file mode 100644 (file)
index ea74e38..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-## @file\r
-#  Provides Null version of VariableKeyLib for build only.\r
-#\r
-#  Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
-#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010029\r
-  BASE_NAME                      = VariableKeyLibNull\r
-  FILE_GUID                      = 2B640ED8-1E6A-4516-9F1D-25910E59BC4A\r
-  MODULE_TYPE                    = BASE\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = VariableKeyLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 Arm AArch64\r
-#\r
-\r
-[Sources]\r
-  VariableKeyLibNull.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  SecurityPkg/SecurityPkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  DebugLib\r
-\r
index 7ecf9565d98ca668658eb5f3c9c3d31b0e7b6098..358b3dc543a1e79fe3d8eeb65e305b631d41f427 100644 (file)
   #\r
   TcgStorageOpalLib|Include/Library/TcgStorageOpalLib.h\r
 \r
-  ## @libraryclass  Provides interfaces to access RPMC device.\r
-  #\r
-  RpmcLib|Include/Library/RpmcLib.h\r
-\r
-  ## @libraryclass  Provides interfaces to access variable root key.\r
-  #\r
-  VariableKeyLib|Include/Library/VariableKeyLib.h\r
-\r
   ## @libraryclass  Provides interfaces about firmware TPM measurement.\r
   #\r
   TcgEventLogRecordLib|Include/Library/TcgEventLogRecordLib.h\r
index 30d911d8a1418eca15846fe86d496c6d30803f10..2f679c87a92f0bcd689650b9e83d4a91e59836fb 100644 (file)
@@ -68,8 +68,6 @@
   TcgStorageCoreLib|SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf\r
   TcgStorageOpalLib|SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf\r
   ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf\r
-  VariableKeyLib|SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf\r
-  RpmcLib|SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf\r
   TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf\r
   MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf\r
   SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf\r
   #\r
   # Variable Confidentiality & Integrity\r
   #\r
-  SecurityPkg/Library/VariableKeyLibNull/VariableKeyLibNull.inf\r
-  SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf\r
   SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf\r
 \r
   #\r