VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.c@ 95057

最後變更 在這個檔案從95057是 80721,由 vboxsync 提交於 6 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.6 KB
 
1/** @file
2 NULL FMP authentication library.
3
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include <Uefi.h>
10
11#include <Library/DebugLib.h>
12#include <Library/FmpAuthenticationLib.h>
13
14/**
15 The function is used to do the authentication for FMP capsule based upon
16 EFI_FIRMWARE_IMAGE_AUTHENTICATION.
17
18 The FMP capsule image should start with EFI_FIRMWARE_IMAGE_AUTHENTICATION,
19 followed by the payload.
20
21 If the return status is RETURN_SUCCESS, the caller may continue the rest
22 FMP update process.
23 If the return status is NOT RETURN_SUCCESS, the caller should stop the FMP
24 update process and convert the return status to LastAttemptStatus
25 to indicate that FMP update fails.
26 The LastAttemptStatus can be got from ESRT table or via
27 EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo().
28
29 Caution: This function may receive untrusted input.
30
31 @param[in] Image Points to an FMP authentication image, started from EFI_FIRMWARE_IMAGE_AUTHENTICATION.
32 @param[in] ImageSize Size of the authentication image in bytes.
33 @param[in] PublicKeyData The public key data used to validate the signature.
34 @param[in] PublicKeyDataLength The length of the public key data.
35
36 @retval RETURN_SUCCESS Authentication pass.
37 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_SUCCESS.
38 @retval RETURN_SECURITY_VIOLATION Authentication fail.
39 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR.
40 @retval RETURN_INVALID_PARAMETER The image is in an invalid format.
41 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
42 @retval RETURN_UNSUPPORTED No Authentication handler associated with CertType.
43 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
44 @retval RETURN_UNSUPPORTED Image or ImageSize is invalid.
45 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT.
46 @retval RETURN_OUT_OF_RESOURCES No Authentication handler associated with CertType.
47 The LastAttemptStatus should be LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES.
48**/
49RETURN_STATUS
50EFIAPI
51AuthenticateFmpImage (
52 IN EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image,
53 IN UINTN ImageSize,
54 IN CONST UINT8 *PublicKeyData,
55 IN UINTN PublicKeyDataLength
56 )
57{
58 ASSERT(FALSE);
59 return RETURN_UNSUPPORTED;
60}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette