]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/DxeImageVerificationLib/Measurement.c
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Library / DxeImageVerificationLib / Measurement.c
index 1dc29895f31af51f9f7acbcf72e6aa68a00a3086..86d8eb484052635086bb9942900cd4e6f0ed4644 100644 (file)
@@ -1,21 +1,14 @@
 /** @file\r
-  Measure TrEE required variable.\r
+  Measure TCG required variable.\r
 \r
-Copyright (c) 2013 - 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include <PiDxe.h>\r
 #include <Guid/ImageAuthentication.h>\r
 #include <IndustryStandard/UefiTcgPlatform.h>\r
-#include <Protocol/TrEEProtocol.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
@@ -98,9 +91,9 @@ AssignVendorGuid (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
 **/\r
@@ -152,8 +145,8 @@ AddDataMeasured (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
 \r
   @retval TRUE  The data is already measured.\r
   @retval FALSE The data is not measured yet.\r
@@ -198,7 +191,7 @@ IsSecureAuthorityVariable (
   UINTN   Index;\r
 \r
   for (Index = 0; Index < sizeof(mVariableType)/sizeof(mVariableType[0]); Index++) {\r
-    if ((StrCmp (VariableName, mVariableType[Index].VariableName) == 0) && \r
+    if ((StrCmp (VariableName, mVariableType[Index].VariableName) == 0) &&\r
         (CompareGuid (VendorGuid, mVariableType[Index].VendorGuid))) {\r
       return TRUE;\r
     }\r
@@ -211,9 +204,9 @@ IsSecureAuthorityVariable (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -230,18 +223,18 @@ MeasureVariable (
 {\r
   EFI_STATUS                        Status;\r
   UINTN                             VarNameLength;\r
-  EFI_VARIABLE_DATA_TREE            *VarLog;\r
+  UEFI_VARIABLE_DATA                *VarLog;\r
   UINT32                            VarLogSize;\r
 \r
   //\r
-  // The EFI_VARIABLE_DATA_TREE.VariableData value shall be the EFI_SIGNATURE_DATA value\r
+  // The UEFI_VARIABLE_DATA.VariableData value shall be the EFI_SIGNATURE_DATA value\r
   // from the EFI_SIGNATURE_LIST that contained the authority that was used to validate the image\r
   //\r
   VarNameLength      = StrLen (VarName);\r
   VarLogSize = (UINT32)(sizeof (*VarLog) + VarNameLength * sizeof (*VarName) + VarSize\r
                         - sizeof (VarLog->UnicodeName) - sizeof (VarLog->VariableData));\r
 \r
-  VarLog = (EFI_VARIABLE_DATA_TREE *) AllocateZeroPool (VarLogSize);\r
+  VarLog = (UEFI_VARIABLE_DATA *) AllocateZeroPool (VarLogSize);\r
   if (VarLog == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r