1dea4eb
From 24ceffbbe2764a31328e1146a2cf4bdcf85664e7 Mon Sep 17 00:00:00 2001
6a91557
From: Dave Howells <dhowells@redhat.com>
6a91557
Date: Tue, 23 Oct 2012 09:30:54 -0400
1dea4eb
Subject: [PATCH] Add EFI signature data types
6a91557
6a91557
Add the data types that are used for containing hashes, keys and certificates
6a91557
for cryptographic verification.
6a91557
6a91557
Bugzilla: N/A
6a91557
Upstream-status: Fedora mustard for now
6a91557
6a91557
Signed-off-by: David Howells <dhowells@redhat.com>
6a91557
---
6a91557
 include/linux/efi.h | 20 ++++++++++++++++++++
6a91557
 1 file changed, 20 insertions(+)
6a91557
6a91557
diff --git a/include/linux/efi.h b/include/linux/efi.h
1dea4eb
index 333d0ca6940f..b3efb6d06344 100644
6a91557
--- a/include/linux/efi.h
6a91557
+++ b/include/linux/efi.h
1dea4eb
@@ -603,6 +603,12 @@ void efi_native_runtime_setup(void);
1dea4eb
 	EFI_GUID(0x3152bca5, 0xeade, 0x433d, \
1dea4eb
 		 0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44)
6a91557
 
6a91557
+#define EFI_CERT_SHA256_GUID \
6a91557
+    EFI_GUID(  0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28 )
6a91557
+
6a91557
+#define EFI_CERT_X509_GUID \
6a91557
+    EFI_GUID(  0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 )
6a91557
+
6a91557
 typedef struct {
6a91557
 	efi_guid_t guid;
6a91557
 	u64 table;
1dea4eb
@@ -827,6 +833,20 @@ typedef struct {
6a91557
 
6a91557
 #define EFI_INVALID_TABLE_ADDR		(~0UL)
6a91557
 
6a91557
+typedef struct  {
6a91557
+	efi_guid_t signature_owner;
6a91557
+	u8 signature_data[];
6a91557
+} efi_signature_data_t;
6a91557
+
6a91557
+typedef struct {
6a91557
+	efi_guid_t signature_type;
6a91557
+	u32 signature_list_size;
6a91557
+	u32 signature_header_size;
6a91557
+	u32 signature_size;
6a91557
+	u8 signature_header[];
6a91557
+	/* efi_signature_data_t signatures[][] */
6a91557
+} efi_signature_list_t;
6a91557
+
6a91557
 /*
6a91557
  * All runtime access to EFI goes through this structure:
6a91557
  */
18c8249
-- 
7c1bce7
2.5.0
18c8249