VariableKeyLibNull.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /** @file
  2. Null version of VariableKeyLib for build purpose. Don't use it in real product.
  3. Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include <Library/DebugLib.h>
  7. #include <Library/VariableKeyLib.h>
  8. /**
  9. Retrieves the key for integrity and/or confidentiality of variables.
  10. @param[out] VariableKey A pointer to pointer for the variable key buffer.
  11. @param[in,out] VariableKeySize The size in bytes of the variable key.
  12. @retval EFI_SUCCESS The variable key was returned.
  13. @retval EFI_DEVICE_ERROR An error occurred while attempting to get the variable key.
  14. @retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
  15. @retval EFI_UNSUPPORTED The variable key is not supported in the current boot configuration.
  16. **/
  17. EFI_STATUS
  18. EFIAPI
  19. GetVariableKey (
  20. OUT VOID **VariableKey,
  21. IN OUT UINTN *VariableKeySize
  22. )
  23. {
  24. ASSERT (FALSE);
  25. return EFI_UNSUPPORTED;
  26. }
  27. /**
  28. Regenerates the variable key.
  29. @retval EFI_SUCCESS The variable key was regenerated successfully.
  30. @retval EFI_DEVICE_ERROR An error occurred while attempting to regenerate the key.
  31. @retval EFI_ACCESS_DENIED The function was invoked after locking the key interface.
  32. @retval EFI_UNSUPPORTED Key regeneration is not supported in the current boot configuration.
  33. **/
  34. EFI_STATUS
  35. EFIAPI
  36. RegenerateVariableKey (
  37. VOID
  38. )
  39. {
  40. ASSERT (FALSE);
  41. return EFI_UNSUPPORTED;
  42. }
  43. /**
  44. Locks the regenerate key interface.
  45. @retval EFI_SUCCESS The key interface was locked successfully.
  46. @retval EFI_UNSUPPORTED Locking the key interface is not supported in the current boot configuration.
  47. @retval Others An error occurred while attempting to lock the key interface.
  48. **/
  49. EFI_STATUS
  50. EFIAPI
  51. LockVariableKeyInterface (
  52. VOID
  53. )
  54. {
  55. ASSERT (FALSE);
  56. return EFI_UNSUPPORTED;
  57. }