Skip to content

Commit 5c126ba

Browse files
dhowellsmimizohar
authored andcommitted
efi: Add EFI signature data types
Add the data types that are used for containing hashes, keys and certificates for cryptographic verification along with their corresponding type GUIDs. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Nayna Jain <nayna@linux.ibm.com> Acked-by: Serge Hallyn <serge@hallyn.com> Reviewed-by: James Morris <james.morris@microsoft.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent 60740ac commit 5c126ba

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎include/linux/efi.h‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,10 @@ void efi_native_runtime_setup(void);
663663
#define EFI_IMAGE_SECURITY_DATABASE_GUID EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f)
664664
#define EFI_SHIM_LOCK_GUID EFI_GUID(0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23)
665665

666+
#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
667+
#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
668+
#define EFI_CERT_X509_SHA256_GUID EFI_GUID(0x3bd2a492, 0x96c0, 0x4079, 0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed)
669+
666670
/*
667671
* This GUID is used to pass to the kernel proper the struct screen_info
668672
* structure that was populated by the stub based on the GOP protocol instance
@@ -934,6 +938,27 @@ typedef struct {
934938
efi_memory_desc_t entry[0];
935939
} efi_memory_attributes_table_t;
936940

941+
typedef struct {
942+
efi_guid_t signature_owner;
943+
u8 signature_data[];
944+
} efi_signature_data_t;
945+
946+
typedef struct {
947+
efi_guid_t signature_type;
948+
u32 signature_list_size;
949+
u32 signature_header_size;
950+
u32 signature_size;
951+
u8 signature_header[];
952+
/* efi_signature_data_t signatures[][] */
953+
} efi_signature_list_t;
954+
955+
typedef u8 efi_sha256_hash_t[32];
956+
957+
typedef struct {
958+
efi_sha256_hash_t to_be_signed_hash;
959+
efi_time_t time_of_revocation;
960+
} efi_cert_x509_sha256_t;
961+
937962
/*
938963
* All runtime access to EFI goes through this structure:
939964
*/

0 commit comments

Comments
 (0)