11#ifndef __IMAGE_AUTHTICATION_H__
12#define __IMAGE_AUTHTICATION_H__
17#define EFI_IMAGE_SECURITY_DATABASE_GUID \
19 0xd719b2cb, 0x3d3a, 0x4596, { 0xa3, 0xbc, 0xda, 0xd0, 0xe, 0x67, 0x65, 0x6f } \
26#define EFI_IMAGE_SECURITY_DATABASE L"db"
31#define EFI_IMAGE_SECURITY_DATABASE1 L"dbx"
36#define EFI_IMAGE_SECURITY_DATABASE2 L"dbt"
38#define SECURE_BOOT_MODE_ENABLE 1
39#define SECURE_BOOT_MODE_DISABLE 0
44#define DEVICE_AUTH_BOOT_MODE_ENABLE 1
45#define DEVICE_AUTH_BOOT_MODE_DISABLE 0
63 UINT8 SignatureData[1];
133#define EFI_CERT_SHA256_GUID \
135 0xc1c41626, 0x504c, 0x4092, {0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28} \
145#define EFI_CERT_RSA2048_GUID \
147 0x3c5766e8, 0x269c, 0x4e34, {0xaa, 0x14, 0xed, 0x77, 0x6e, 0x85, 0xb3, 0xb6} \
155#define EFI_CERT_RSA2048_SHA256_GUID \
157 0xe2b36190, 0x879b, 0x4a3d, {0xad, 0x8d, 0xf2, 0xe7, 0xbb, 0xa3, 0x27, 0x84} \
164#define EFI_CERT_SHA1_GUID \
166 0x826ca512, 0xcf10, 0x4ac9, {0xb1, 0x87, 0xbe, 0x1, 0x49, 0x66, 0x31, 0xbd} \
174#define EFI_CERT_RSA2048_SHA1_GUID \
176 0x67f8444f, 0x8743, 0x48f1, {0xa3, 0x28, 0x1e, 0xaa, 0xb8, 0x73, 0x60, 0x80} \
188#define EFI_CERT_X509_GUID \
190 0xa5c059a1, 0x94e4, 0x4aa7, {0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72} \
198#define EFI_CERT_SHA224_GUID \
200 0xb6e5233, 0xa65c, 0x44c9, {0x94, 0x7, 0xd9, 0xab, 0x83, 0xbf, 0xc8, 0xbd} \
208#define EFI_CERT_SHA384_GUID \
210 0xff3e5307, 0x9fd0, 0x48c9, {0x85, 0xf1, 0x8a, 0xd5, 0x6c, 0x70, 0x1e, 0x1} \
218#define EFI_CERT_SHA512_GUID \
220 0x93e0fae, 0xa6c4, 0x4f50, {0x9f, 0x1b, 0xd4, 0x1e, 0x2b, 0x89, 0xc1, 0x9a} \
231#define EFI_CERT_X509_SHA256_GUID \
233 0x3bd2a492, 0x96c0, 0x4079, {0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed } \
244#define EFI_CERT_X509_SHA384_GUID \
246 0x7076876e, 0x80c2, 0x4ee6, {0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b } \
257#define EFI_CERT_X509_SHA512_GUID \
259 0x446dbf63, 0x2502, 0x4cda, {0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d } \
266#define EFI_CERT_TYPE_PKCS7_GUID \
268 0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7} \
274typedef UINT32 EFI_IMAGE_EXECUTION_ACTION;
276#define EFI_IMAGE_EXECUTION_AUTHENTICATION 0x00000007
277#define EFI_IMAGE_EXECUTION_AUTH_UNTESTED 0x00000000
278#define EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED 0x00000001
279#define EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED 0x00000002
280#define EFI_IMAGE_EXECUTION_AUTH_SIG_NOT_FOUND 0x00000003
281#define EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND 0x00000004
282#define EFI_IMAGE_EXECUTION_POLICY_FAILED 0x00000005
283#define EFI_IMAGE_EXECUTION_INITIALIZED 0x00000008
333extern EFI_GUID gEfiImageSecurityDatabaseGuid;
336extern EFI_GUID gEfiCertRsa2048Sha256Guid;
338extern EFI_GUID gEfiCertRsa2048Sha1Guid;
343extern EFI_GUID gEfiCertX509Sha256Guid;
344extern EFI_GUID gEfiCertX509Sha384Guid;
345extern EFI_GUID gEfiCertX509Sha512Guid;
EFI_SHA256_HASH ToBeSignedHash
EFI_TIME TimeOfRevocation
EFI_SHA384_HASH ToBeSignedHash
EFI_TIME TimeOfRevocation
EFI_SHA512_HASH ToBeSignedHash
EFI_TIME TimeOfRevocation
EFI_IMAGE_EXECUTION_ACTION Action
UINT32 SignatureHeaderSize