]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
UEFI 2.4 X509 Certificate Hash and RFC3161 Timestamp Verification support for Secure...
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / SecureBootConfigDxe / SecureBootConfigImpl.h
index f87afbe709b9155458cbe91442ebf3cad3073320..228f44bde81441fca00c2625cb40b8f9b1af8a25 100644 (file)
@@ -2,7 +2,7 @@
   The header file of HII Config Access protocol implementation of SecureBoot\r
   configuration module.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -73,9 +73,18 @@ extern  EFI_IFR_GUID_LABEL         *mEndLabel;
 //\r
 #define SHA256_DIGEST_SIZE  32\r
 //\r
-// Set max digest size as SHA256 Output (32 bytes) by far\r
+// SHA-384 digest size in bytes\r
 //\r
-#define MAX_DIGEST_SIZE    SHA256_DIGEST_SIZE\r
+#define SHA384_DIGEST_SIZE  48\r
+//\r
+// SHA-512 digest size in bytes\r
+//\r
+#define SHA512_DIGEST_SIZE  64\r
+\r
+//\r
+// Set max digest size as SHA512 Output (64 bytes) by far\r
+//\r
+#define MAX_DIGEST_SIZE    SHA512_DIGEST_SIZE\r
 \r
 #define WIN_CERT_UEFI_RSA2048_SIZE               256\r
 \r
@@ -87,6 +96,7 @@ extern  EFI_IFR_GUID_LABEL         *mEndLabel;
 #define HASHALG_SHA256                         0x00000002\r
 #define HASHALG_SHA384                         0x00000003\r
 #define HASHALG_SHA512                         0x00000004\r
+#define HASHALG_RAW                            0x00000005\r
 #define HASHALG_MAX                            0x00000005\r
 \r
 \r
@@ -120,6 +130,7 @@ typedef enum _FILE_EXPLORER_STATE {
   FileExplorerStateEnrollKekFile,\r
   FileExplorerStateEnrollSignatureFileToDb,\r
   FileExplorerStateEnrollSignatureFileToDbx,\r
+  FileExplorerStateEnrollSignatureFileToDbt,\r
   FileExplorerStateUnknown\r
 } FILE_EXPLORER_STATE;\r
 \r
@@ -316,7 +327,7 @@ BOOLEAN
 typedef struct {\r
   CHAR16                   *Name;           ///< Name for Hash Algorithm\r
   UINTN                    DigestLength;    ///< Digest Length\r
-  UINT8                    *OidValue;       ///< Hash Algorithm OID ASN.1 Value \r
+  UINT8                    *OidValue;       ///< Hash Algorithm OID ASN.1 Value\r
   UINTN                    OidLength;       ///< Length of Hash OID Value\r
   HASH_GET_CONTEXT_SIZE    GetContextSize;  ///< Pointer to Hash GetContentSize function\r
   HASH_INIT                HashInit;        ///< Pointer to Hash Init function\r
@@ -471,7 +482,7 @@ DevicePathToStr (
 \r
 \r
 /**\r
-  Clean up the dynamic opcode at label and form specified by both LabelId. \r
+  Clean up the dynamic opcode at label and form specified by both LabelId.\r
 \r
   @param[in] LabelId         It is both the Form ID and Label ID for opcode deletion.\r
   @param[in] PrivateData     Module private data.\r
@@ -505,7 +516,7 @@ UpdateFileExplorer (
   Free resources allocated in Allocate Rountine.\r
 \r
   @param[in, out]  MenuOption        Menu to be freed\r
-  \r
+\r
 **/\r
 VOID\r
 FreeMenu (\r
@@ -514,15 +525,15 @@ FreeMenu (
 \r
 \r
 /**\r
-  Read file content into BufferPtr, the size of the allocate buffer \r
+  Read file content into BufferPtr, the size of the allocate buffer\r
   is *FileSize plus AddtionAllocateSize.\r
 \r
   @param[in]       FileHandle            The file to be read.\r
   @param[in, out]  BufferPtr             Pointers to the pointer of allocated buffer.\r
   @param[out]      FileSize              Size of input file\r
-  @param[in]       AddtionAllocateSize   Addtion size the buffer need to be allocated. \r
+  @param[in]       AddtionAllocateSize   Addtion size the buffer need to be allocated.\r
                                          In case the buffer need to contain others besides the file content.\r
-  \r
+\r
   @retval   EFI_SUCCESS                  The file was read into the buffer.\r
   @retval   EFI_INVALID_PARAMETER        A parameter was invalid.\r
   @retval   EFI_OUT_OF_RESOURCES         A memory allocation failed.\r
@@ -542,7 +553,7 @@ ReadFileContent (
   Close an open file handle.\r
 \r
   @param[in] FileHandle           The file handle to close.\r
-  \r
+\r
 **/\r
 VOID\r
 CloseFile (\r
@@ -555,7 +566,7 @@ CloseFile (
 \r
   @param[in]   Integer          Pointer to the nonnegative integer to be converted\r
   @param[in]   IntSizeInWords   Length of integer buffer in words\r
-  @param[out]  OctetString      Converted octet string of the specified length \r
+  @param[out]  OctetString      Converted octet string of the specified length\r
   @param[in]   OSSizeInBytes    Intended length of resulting octet string in bytes\r
 \r
 Returns:\r
@@ -587,8 +598,8 @@ Int2OctStr (
 **/\r
 EFI_STATUS\r
 StringToGuid (\r
-  IN   CHAR16           *Str, \r
-  IN   UINTN            StrLen, \r
+  IN   CHAR16           *Str,\r
+  IN   UINTN            StrLen,\r
   OUT  EFI_GUID         *Guid\r
   );\r
 \r
@@ -599,7 +610,7 @@ StringToGuid (
   @param[in]     Guid          Pointer to GUID to print.\r
   @param[in]     Buffer        Buffer to print Guid into.\r
   @param[in]     BufferSize    Size of Buffer.\r
-  \r
+\r
   @retval    Number of characters printed.\r
 \r
 **/\r
@@ -610,4 +621,4 @@ GuidToString (
   IN  UINTN     BufferSize\r
   );\r
 \r
-#endif\r
+#endif
\ No newline at end of file