TianoCore EDK2 master
|
#include <Library/UefiDriverEntryPoint.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseCryptLib.h>
#include <Library/PcdLib.h>
#include <Library/DevicePathLib.h>
#include <Library/SecurityManagementLib.h>
#include <Library/PeCoffLib.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/DevicePath.h>
#include <Protocol/BlockIo.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/VariableWrite.h>
#include <Guid/ImageAuthentication.h>
#include <Guid/AuthenticatedVariableFormat.h>
#include <IndustryStandard/PeImage.h>
Go to the source code of this file.
Data Structures | |
struct | WIN_CERTIFICATE_EFI_PKCS |
struct | HASH_TABLE |
Macros | |
#define | EFI_CERT_TYPE_RSA2048_SHA256_SIZE 256 |
#define | EFI_CERT_TYPE_RSA2048_SIZE 256 |
#define | MAX_NOTIFY_STRING_LEN 64 |
#define | TWO_BYTE_ENCODE 0x82 |
#define | ALIGNMENT_SIZE 8 |
#define | ALIGN_SIZE(a) (((a) % ALIGNMENT_SIZE) ? ALIGNMENT_SIZE - ((a) % ALIGNMENT_SIZE) : 0) |
#define | IMAGE_UNKNOWN 0x00000000 |
#define | IMAGE_FROM_FV 0x00000001 |
#define | IMAGE_FROM_OPTION_ROM 0x00000002 |
#define | IMAGE_FROM_REMOVABLE_MEDIA 0x00000003 |
#define | IMAGE_FROM_FIXED_MEDIA 0x00000004 |
#define | ALWAYS_EXECUTE 0x00000000 |
#define | NEVER_EXECUTE 0x00000001 |
#define | ALLOW_EXECUTE_ON_SECURITY_VIOLATION 0x00000002 |
#define | DEFER_EXECUTE_ON_SECURITY_VIOLATION 0x00000003 |
#define | DENY_EXECUTE_ON_SECURITY_VIOLATION 0x00000004 |
#define | QUERY_USER_ON_SECURITY_VIOLATION 0x00000005 |
#define | HASHALG_SHA1 0x00000000 |
#define | HASHALG_SHA224 0x00000001 |
#define | HASHALG_SHA256 0x00000002 |
#define | HASHALG_SHA384 0x00000003 |
#define | HASHALG_SHA512 0x00000004 |
#define | HASHALG_MAX 0x00000005 |
#define | MAX_DIGEST_SIZE SHA512_DIGEST_SIZE |
Typedefs | |
typedef UINTN(EFIAPI * | HASH_GET_CONTEXT_SIZE) (VOID) |
typedef BOOLEAN(EFIAPI * | HASH_INIT) (IN OUT VOID *HashContext) |
typedef BOOLEAN(EFIAPI * | HASH_UPDATE) (IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength) |
typedef BOOLEAN(EFIAPI * | HASH_FINAL) (IN OUT VOID *HashContext, OUT UINT8 *HashValue) |
The internal header file includes the common header files, defines internal structure and functions used by ImageVerificationLib.
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeImageVerificationLib.h.
#define ALIGN_SIZE | ( | a | ) | (((a) % ALIGNMENT_SIZE) ? ALIGNMENT_SIZE - ((a) % ALIGNMENT_SIZE) : 0) |
Definition at line 41 of file DxeImageVerificationLib.h.
#define ALIGNMENT_SIZE 8 |
Definition at line 40 of file DxeImageVerificationLib.h.
#define ALLOW_EXECUTE_ON_SECURITY_VIOLATION 0x00000002 |
Definition at line 57 of file DxeImageVerificationLib.h.
#define ALWAYS_EXECUTE 0x00000000 |
Definition at line 55 of file DxeImageVerificationLib.h.
#define DEFER_EXECUTE_ON_SECURITY_VIOLATION 0x00000003 |
Definition at line 58 of file DxeImageVerificationLib.h.
#define DENY_EXECUTE_ON_SECURITY_VIOLATION 0x00000004 |
Definition at line 59 of file DxeImageVerificationLib.h.
#define EFI_CERT_TYPE_RSA2048_SHA256_SIZE 256 |
Definition at line 35 of file DxeImageVerificationLib.h.
#define EFI_CERT_TYPE_RSA2048_SIZE 256 |
Definition at line 36 of file DxeImageVerificationLib.h.
#define HASHALG_MAX 0x00000005 |
Definition at line 70 of file DxeImageVerificationLib.h.
#define HASHALG_SHA1 0x00000000 |
Definition at line 65 of file DxeImageVerificationLib.h.
#define HASHALG_SHA224 0x00000001 |
Definition at line 66 of file DxeImageVerificationLib.h.
#define HASHALG_SHA256 0x00000002 |
Definition at line 67 of file DxeImageVerificationLib.h.
#define HASHALG_SHA384 0x00000003 |
Definition at line 68 of file DxeImageVerificationLib.h.
#define HASHALG_SHA512 0x00000004 |
Definition at line 69 of file DxeImageVerificationLib.h.
#define IMAGE_FROM_FIXED_MEDIA 0x00000004 |
Definition at line 50 of file DxeImageVerificationLib.h.
#define IMAGE_FROM_FV 0x00000001 |
Definition at line 47 of file DxeImageVerificationLib.h.
#define IMAGE_FROM_OPTION_ROM 0x00000002 |
Definition at line 48 of file DxeImageVerificationLib.h.
#define IMAGE_FROM_REMOVABLE_MEDIA 0x00000003 |
Definition at line 49 of file DxeImageVerificationLib.h.
#define IMAGE_UNKNOWN 0x00000000 |
Definition at line 46 of file DxeImageVerificationLib.h.
#define MAX_DIGEST_SIZE SHA512_DIGEST_SIZE |
Definition at line 75 of file DxeImageVerificationLib.h.
#define MAX_NOTIFY_STRING_LEN 64 |
Definition at line 37 of file DxeImageVerificationLib.h.
#define NEVER_EXECUTE 0x00000001 |
Definition at line 56 of file DxeImageVerificationLib.h.
#define QUERY_USER_ON_SECURITY_VIOLATION 0x00000005 |
Definition at line 60 of file DxeImageVerificationLib.h.
#define TWO_BYTE_ENCODE 0x82 |
Definition at line 38 of file DxeImageVerificationLib.h.
Completes hash computation and retrieves the digest value into the specified memory. After this function has been called, the context cannot be used again.
If HashContext is NULL, then ASSERT(). If HashValue is NULL, then ASSERT().
[in,out] | HashContext | Pointer to the MD5 context |
[out] | HashValue | Pointer to a buffer that receives the HASH digest value. |
TRUE | HASH digest computation succeeded. |
FALSE | HASH digest computation failed. |
Definition at line 154 of file DxeImageVerificationLib.h.
typedef UINTN(EFIAPI * HASH_GET_CONTEXT_SIZE) (VOID) |
Retrieves the size, in bytes, of the context buffer required for hash operations.
Definition at line 92 of file DxeImageVerificationLib.h.
Initializes user-supplied memory pointed by HashContext as hash context for subsequent use.
If HashContext is NULL, then ASSERT().
[in,out] | HashContext | Pointer to Context being initialized. |
TRUE | HASH context initialization succeeded. |
FALSE | HASH context initialization failed. |
Definition at line 110 of file DxeImageVerificationLib.h.
typedef BOOLEAN(EFIAPI * HASH_UPDATE) (IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength) |
Performs digest on a data buffer of the specified length. This function can be called multiple times to compute the digest of long or discontinuous data streams.
If HashContext is NULL, then ASSERT().
[in,out] | HashContext | Pointer to the MD5 context. |
[in] | Data | Pointer to the buffer containing the data to be hashed. |
[in] | DataLength | Length of Data buffer in bytes. |
TRUE | HASH data digest succeeded. |
FALSE | Invalid HASH context. After HashFinal function has been called, the HASH context cannot be reused. |
Definition at line 131 of file DxeImageVerificationLib.h.