6a9155
From: Dave Howells <dhowells@redhat.com>
6a9155
Date: Tue, 23 Oct 2012 09:30:54 -0400
6a9155
Subject: [PATCH] Add EFI signature data types
6a9155
6a9155
Add the data types that are used for containing hashes, keys and certificates
6a9155
for cryptographic verification.
6a9155
6a9155
Bugzilla: N/A
6a9155
Upstream-status: Fedora mustard for now
6a9155
6a9155
Signed-off-by: David Howells <dhowells@redhat.com>
6a9155
---
6a9155
 include/linux/efi.h | 20 ++++++++++++++++++++
6a9155
 1 file changed, 20 insertions(+)
6a9155
6a9155
diff --git a/include/linux/efi.h b/include/linux/efi.h
6a50f3
index de3e45088d4a..fac43c611614 100644
6a9155
--- a/include/linux/efi.h
6a9155
+++ b/include/linux/efi.h
6a50f3
@@ -595,6 +595,12 @@ void efi_native_runtime_setup(void);
6a9155
 #define DEVICE_TREE_GUID \
6a9155
     EFI_GUID(  0xb1b621d5, 0xf19c, 0x41a5, 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 )
6a9155
 
6a9155
+#define EFI_CERT_SHA256_GUID \
6a9155
+    EFI_GUID(  0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28 )
6a9155
+
6a9155
+#define EFI_CERT_X509_GUID \
6a9155
+    EFI_GUID(  0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 )
6a9155
+
6a9155
 typedef struct {
6a9155
 	efi_guid_t guid;
6a9155
 	u64 table;
6a50f3
@@ -810,6 +816,20 @@ typedef struct _efi_file_io_interface {
6a9155
 
6a9155
 #define EFI_INVALID_TABLE_ADDR		(~0UL)
6a9155
 
6a9155
+typedef struct  {
6a9155
+	efi_guid_t signature_owner;
6a9155
+	u8 signature_data[];
6a9155
+} efi_signature_data_t;
6a9155
+
6a9155
+typedef struct {
6a9155
+	efi_guid_t signature_type;
6a9155
+	u32 signature_list_size;
6a9155
+	u32 signature_header_size;
6a9155
+	u32 signature_size;
6a9155
+	u8 signature_header[];
6a9155
+	/* efi_signature_data_t signatures[][] */
6a9155
+} efi_signature_list_t;
6a9155
+
6a9155
 /*
6a9155
  * All runtime access to EFI goes through this structure:
6a9155
  */