XenevaOS
Loading...
Searching...
No Matches
ImageAuthentication.h
Go to the documentation of this file.
1
17#ifndef __IMAGE_AUTHTICATION_H__
18#define __IMAGE_AUTHTICATION_H__
19
20#include <Guid/GlobalVariable.h>
21#include <Protocol/Hash.h>
22
23#define EFI_IMAGE_SECURITY_DATABASE_GUID \
24 { \
25 0xd719b2cb, 0x3d3a, 0x4596, { 0xa3, 0xbc, 0xda, 0xd0, 0xe, 0x67, 0x65, 0x6f } \
26 }
27
32#define EFI_IMAGE_SECURITY_DATABASE L"db"
37#define EFI_IMAGE_SECURITY_DATABASE1 L"dbx"
42#define EFI_IMAGE_SECURITY_DATABASE2 L"dbt"
43
44#define SECURE_BOOT_MODE_ENABLE 1
45#define SECURE_BOOT_MODE_DISABLE 0
46
47#define SETUP_MODE 1
48#define USER_MODE 0
49
50//***********************************************************************
51// Signature Database
52//***********************************************************************
56#pragma pack(1)
57
58typedef struct {
66 UINT8 SignatureData[1];
68
95
106
117
128
129#pragma pack()
130
136#define EFI_CERT_SHA256_GUID \
137 { \
138 0xc1c41626, 0x504c, 0x4092, {0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28} \
139 }
140
148#define EFI_CERT_RSA2048_GUID \
149 { \
150 0x3c5766e8, 0x269c, 0x4e34, {0xaa, 0x14, 0xed, 0x77, 0x6e, 0x85, 0xb3, 0xb6} \
151 }
152
158#define EFI_CERT_RSA2048_SHA256_GUID \
159 { \
160 0xe2b36190, 0x879b, 0x4a3d, {0xad, 0x8d, 0xf2, 0xe7, 0xbb, 0xa3, 0x27, 0x84} \
161 }
162
167#define EFI_CERT_SHA1_GUID \
168 { \
169 0x826ca512, 0xcf10, 0x4ac9, {0xb1, 0x87, 0xbe, 0x1, 0x49, 0x66, 0x31, 0xbd} \
170 }
171
177#define EFI_CERT_RSA2048_SHA1_GUID \
178 { \
179 0x67f8444f, 0x8743, 0x48f1, {0xa3, 0x28, 0x1e, 0xaa, 0xb8, 0x73, 0x60, 0x80} \
180 }
181
191#define EFI_CERT_X509_GUID \
192 { \
193 0xa5c059a1, 0x94e4, 0x4aa7, {0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72} \
194 }
195
201#define EFI_CERT_SHA224_GUID \
202 { \
203 0xb6e5233, 0xa65c, 0x44c9, {0x94, 0x7, 0xd9, 0xab, 0x83, 0xbf, 0xc8, 0xbd} \
204 }
205
211#define EFI_CERT_SHA384_GUID \
212 { \
213 0xff3e5307, 0x9fd0, 0x48c9, {0x85, 0xf1, 0x8a, 0xd5, 0x6c, 0x70, 0x1e, 0x1} \
214 }
215
221#define EFI_CERT_SHA512_GUID \
222 { \
223 0x93e0fae, 0xa6c4, 0x4f50, {0x9f, 0x1b, 0xd4, 0x1e, 0x2b, 0x89, 0xc1, 0x9a} \
224 }
225
234#define EFI_CERT_X509_SHA256_GUID \
235 { \
236 0x3bd2a492, 0x96c0, 0x4079, {0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed } \
237 }
238
247#define EFI_CERT_X509_SHA384_GUID \
248 { \
249 0x7076876e, 0x80c2, 0x4ee6, {0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b } \
250 }
251
260#define EFI_CERT_X509_SHA512_GUID \
261 { \
262 0x446dbf63, 0x2502, 0x4cda, {0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d } \
263 }
264
269#define EFI_CERT_TYPE_PKCS7_GUID \
270 { \
271 0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7} \
272 }
273
274//***********************************************************************
275// Image Execution Information Table Definition
276//***********************************************************************
278
279#define EFI_IMAGE_EXECUTION_AUTHENTICATION 0x00000007
280#define EFI_IMAGE_EXECUTION_AUTH_UNTESTED 0x00000000
281#define EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED 0x00000001
282#define EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED 0x00000002
283#define EFI_IMAGE_EXECUTION_AUTH_SIG_NOT_FOUND 0x00000003
284#define EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND 0x00000004
285#define EFI_IMAGE_EXECUTION_POLICY_FAILED 0x00000005
286#define EFI_IMAGE_EXECUTION_INITIALIZED 0x00000008
287
288//
289// EFI_IMAGE_EXECUTION_INFO is added to EFI System Configuration Table
290// and assigned the GUID EFI_IMAGE_SECURITY_DATABASE_GUID.
291//
324
325
326typedef struct {
334 // EFI_IMAGE_EXECUTION_INFO InformationInfo[]
336
351
352#endif
UINT64 UINTN
Definition ProcessorBind.h:118
unsigned int UINT32
Definition ProcessorBind.h:102
UINT8 EFI_SHA256_HASH[32]
Definition Hash.h:87
UINT8 EFI_SHA512_HASH[64]
Definition Hash.h:89
UINT8 EFI_SHA384_HASH[48]
Definition Hash.h:88
EFI_GUID gEfiCertX509Sha256Guid
EFI_GUID gEfiCertX509Sha512Guid
EFI_GUID gEfiCertSha384Guid
EFI_GUID gEfiCertRsa2048Sha1Guid
UINT32 EFI_IMAGE_EXECUTION_ACTION
Definition ImageAuthentication.h:277
EFI_GUID gEfiCertX509Sha384Guid
EFI_GUID gEfiCertRsa2048Guid
EFI_GUID gEfiCertSha1Guid
EFI_GUID gEfiCertSha224Guid
EFI_GUID gEfiCertRsa2048Sha256Guid
EFI_GUID gEfiCertX509Guid
EFI_GUID gEfiImageSecurityDatabaseGuid
EFI_GUID gEfiCertSha512Guid
EFI_GUID gEfiCertSha256Guid
EFI_GUID gEfiCertPkcs7Guid
unsigned char UINT8
Definition actypes.h:236
Definition ImageAuthentication.h:96
EFI_SHA256_HASH ToBeSignedHash
Definition ImageAuthentication.h:100
EFI_TIME TimeOfRevocation
Definition ImageAuthentication.h:104
Definition ImageAuthentication.h:107
EFI_SHA384_HASH ToBeSignedHash
Definition ImageAuthentication.h:111
EFI_TIME TimeOfRevocation
Definition ImageAuthentication.h:115
Definition ImageAuthentication.h:118
EFI_SHA512_HASH ToBeSignedHash
Definition ImageAuthentication.h:122
EFI_TIME TimeOfRevocation
Definition ImageAuthentication.h:126
Definition ImageAuthentication.h:326
UINTN NumberOfImages
Definition ImageAuthentication.h:330
Definition ImageAuthentication.h:292
EFI_IMAGE_EXECUTION_ACTION Action
Definition ImageAuthentication.h:296
UINT32 InfoSize
Definition ImageAuthentication.h:300
Definition ImageAuthentication.h:58
EFI_GUID SignatureOwner
Definition ImageAuthentication.h:62
Definition ImageAuthentication.h:69
UINT32 SignatureHeaderSize
Definition ImageAuthentication.h:81
EFI_GUID SignatureType
Definition ImageAuthentication.h:73
UINT32 SignatureListSize
Definition ImageAuthentication.h:77
UINT32 SignatureSize
Definition ImageAuthentication.h:85
Definition UefiBaseType.h:72
Definition Base.h:281