10#ifndef __IMAGEVERIFICATIONLIB_H__
11#define __IMAGEVERIFICATIONLIB_H__
35#define EFI_CERT_TYPE_RSA2048_SHA256_SIZE 256
36#define EFI_CERT_TYPE_RSA2048_SIZE 256
37#define MAX_NOTIFY_STRING_LEN 64
38#define TWO_BYTE_ENCODE 0x82
40#define ALIGNMENT_SIZE 8
41#define ALIGN_SIZE(a) (((a) % ALIGNMENT_SIZE) ? ALIGNMENT_SIZE - ((a) % ALIGNMENT_SIZE) : 0)
46#define IMAGE_UNKNOWN 0x00000000
47#define IMAGE_FROM_FV 0x00000001
48#define IMAGE_FROM_OPTION_ROM 0x00000002
49#define IMAGE_FROM_REMOVABLE_MEDIA 0x00000003
50#define IMAGE_FROM_FIXED_MEDIA 0x00000004
55#define ALWAYS_EXECUTE 0x00000000
56#define NEVER_EXECUTE 0x00000001
57#define ALLOW_EXECUTE_ON_SECURITY_VIOLATION 0x00000002
58#define DEFER_EXECUTE_ON_SECURITY_VIOLATION 0x00000003
59#define DENY_EXECUTE_ON_SECURITY_VIOLATION 0x00000004
60#define QUERY_USER_ON_SECURITY_VIOLATION 0x00000005
65#define HASHALG_SHA1 0x00000000
66#define HASHALG_SHA224 0x00000001
67#define HASHALG_SHA256 0x00000002
68#define HASHALG_SHA384 0x00000003
69#define HASHALG_SHA512 0x00000004
70#define HASHALG_MAX 0x00000005
75#define MAX_DIGEST_SIZE SHA512_DIGEST_SIZE
112 IN OUT VOID *HashContext
133 IN OUT VOID *HashContext,
156 IN OUT VOID *HashContext,
BOOLEAN(EFIAPI * HASH_UPDATE)(IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength)
BOOLEAN(EFIAPI * HASH_INIT)(IN OUT VOID *HashContext)
UINTN(EFIAPI * HASH_GET_CONTEXT_SIZE)(VOID)
BOOLEAN(EFIAPI * HASH_FINAL)(IN OUT VOID *HashContext, OUT UINT8 *HashValue)
HASH_FINAL HashFinal
Pointer to Hash Final function.
UINTN DigestLength
Digest Length.
UINTN OidLength
Length of Hash OID Value.
CHAR16 * Name
Name for Hash Algorithm.
HASH_UPDATE HashUpdate
Pointer to Hash Update function.
UINT8 * OidValue
Hash Algorithm OID ASN.1 Value.
HASH_GET_CONTEXT_SIZE GetContextSize
Pointer to Hash GetContentSize function.
HASH_INIT HashInit
Pointer to Hash Init function.