summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/FmpAuthenticationLibNull
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/FmpAuthenticationLibNull')
-rw-r--r--MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c120
-rw-r--r--MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf70
-rw-r--r--MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.uni32
3 files changed, 111 insertions, 111 deletions
diff --git a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c
index 6b205a9715..a4b151fa7c 100644
--- a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c
+++ b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c
@@ -1,60 +1,60 @@
-/** @file
- NULL FMP authentication library.
-
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <Uefi.h>
-
-#include <Library/DebugLib.h>
-#include <Library/FmpAuthenticationLib.h>
-
-/**
- The function is used to do the authentication for FMP capsule based upon
- EFI_FIRMWARE_IMAGE_AUTHENTICATION.
-
- The FMP capsule image should start with EFI_FIRMWARE_IMAGE_AUTHENTICATION,
- followed by the payload.
-
- If the return status is RETURN_SUCCESS, the caller may continue the rest
- FMP update process.
- If the return status is NOT RETURN_SUCCESS, the caller should stop the FMP
- update process and convert the return status to LastAttemptStatus
- to indicate that FMP update fails.
- The LastAttemptStatus can be got from ESRT table or via
- EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo().
-
- Caution: This function may receive untrusted input.
-
- @param[in] Image Points to an FMP authentication image, started from EFI_FIRMWARE_IMAGE_AUTHENTICATION.
- @param[in] ImageSize Size of the authentication image in bytes.
- @param[in] PublicKeyData The public key data used to validate the signature.
- @param[in] PublicKeyDataLength The length of the public key data.
-
- @retval RETURN_SUCCESS Authentication pass.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_SUCCESS.
- @retval RETURN_SECURITY_VIOLATION Authentication fail.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR.
- @retval RETURN_INVALID_PARAMETER The image is in an invalid format.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
- @retval RETURN_UNSUPPORTED No Authentication handler associated with CertType.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
- @retval RETURN_UNSUPPORTED Image or ImageSize is invalid.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
- @retval RETURN_OUT_OF_RESOURCES No Authentication handler associated with CertType.
- The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES.
-**/
-RETURN_STATUS
-EFIAPI
-AuthenticateFmpImage (
- IN EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image,
- IN UINTN ImageSize,
- IN CONST UINT8 *PublicKeyData,
- IN UINTN PublicKeyDataLength
- )
-{
- ASSERT (FALSE);
- return RETURN_UNSUPPORTED;
-}
+/** @file
+ NULL FMP authentication library.
+
+ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+
+#include <Library/DebugLib.h>
+#include <Library/FmpAuthenticationLib.h>
+
+/**
+ The function is used to do the authentication for FMP capsule based upon
+ EFI_FIRMWARE_IMAGE_AUTHENTICATION.
+
+ The FMP capsule image should start with EFI_FIRMWARE_IMAGE_AUTHENTICATION,
+ followed by the payload.
+
+ If the return status is RETURN_SUCCESS, the caller may continue the rest
+ FMP update process.
+ If the return status is NOT RETURN_SUCCESS, the caller should stop the FMP
+ update process and convert the return status to LastAttemptStatus
+ to indicate that FMP update fails.
+ The LastAttemptStatus can be got from ESRT table or via
+ EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo().
+
+ Caution: This function may receive untrusted input.
+
+ @param[in] Image Points to an FMP authentication image, started from EFI_FIRMWARE_IMAGE_AUTHENTICATION.
+ @param[in] ImageSize Size of the authentication image in bytes.
+ @param[in] PublicKeyData The public key data used to validate the signature.
+ @param[in] PublicKeyDataLength The length of the public key data.
+
+ @retval RETURN_SUCCESS Authentication pass.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_SUCCESS.
+ @retval RETURN_SECURITY_VIOLATION Authentication fail.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR.
+ @retval RETURN_INVALID_PARAMETER The image is in an invalid format.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
+ @retval RETURN_UNSUPPORTED No Authentication handler associated with CertType.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
+ @retval RETURN_UNSUPPORTED Image or ImageSize is invalid.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
+ @retval RETURN_OUT_OF_RESOURCES No Authentication handler associated with CertType.
+ The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES.
+**/
+RETURN_STATUS
+EFIAPI
+AuthenticateFmpImage (
+ IN EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image,
+ IN UINTN ImageSize,
+ IN CONST UINT8 *PublicKeyData,
+ IN UINTN PublicKeyDataLength
+ )
+{
+ ASSERT (FALSE);
+ return RETURN_UNSUPPORTED;
+}
diff --git a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
index 5819df64ca..090e029b01 100644
--- a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
+++ b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
@@ -1,35 +1,35 @@
-## @file
-# FmpAuthentication Library
-#
-# NULL Instance of FmpAuthentication Library.
-#
-# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = FmpAuthenticationLibNull
- MODULE_UNI_FILE = FmpAuthenticationLibNull.uni
- FILE_GUID = 5011522C-7B0E-4ACB-8E30-9B1D133CF2E0
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = FmpAuthenticationLib
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 EBC
-#
-
-[Sources]
- FmpAuthenticationLibNull.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
- DebugLib
+## @file
+# FmpAuthentication Library
+#
+# NULL Instance of FmpAuthentication Library.
+#
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = FmpAuthenticationLibNull
+ MODULE_UNI_FILE = FmpAuthenticationLibNull.uni
+ FILE_GUID = 5011522C-7B0E-4ACB-8E30-9B1D133CF2E0
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = FmpAuthenticationLib
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC
+#
+
+[Sources]
+ FmpAuthenticationLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+
+[LibraryClasses]
+ DebugLib
diff --git a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.uni b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.uni
index 8997d0f17c..89800184f7 100644
--- a/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.uni
+++ b/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.uni
@@ -1,16 +1,16 @@
-// /** @file
-// FmpAuthentication Library
-//
-// NULL Instance of FmpAuthentication Library.
-//
-// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "FmpAuthentication Library"
-
-#string STR_MODULE_DESCRIPTION #language en-US "NULL Instance of FmpAuthentication Library."
-
+// /** @file
+// FmpAuthentication Library
+//
+// NULL Instance of FmpAuthentication Library.
+//
+// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+
+#string STR_MODULE_ABSTRACT #language en-US "FmpAuthentication Library"
+
+#string STR_MODULE_DESCRIPTION #language en-US "NULL Instance of FmpAuthentication Library."
+