]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Include/Library/Tpm2CommandLib.h
SecurityPkg/TpmCommandLib: Add Tpm2ReadPublic.
[mirror_edk2.git] / SecurityPkg / Include / Library / Tpm2CommandLib.h
index 85a4c65e0263c03a9b4bb4f8e05c3da060c9b760..80ada7397b0d48e6968c855038f77a5c64530b91 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is used by other modules to send TPM2 command.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2017, 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
@@ -959,6 +959,26 @@ Tpm2PolicyGetDigest (
      OUT  TPM2B_DIGEST              *PolicyHash\r
   );\r
 \r
+/**\r
+  This command allows access to the public area of a loaded object.\r
+\r
+  @param[in]  ObjectHandle            TPM handle of an object\r
+  @param[out] OutPublic               Structure containing the public area of an object\r
+  @param[out] Name                    Name of the object\r
+  @param[out] QualifiedName           The Qualified Name of the object\r
+\r
+  @retval EFI_SUCCESS      Operation completed successfully.\r
+  @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm2ReadPublic (\r
+  IN  TPMI_DH_OBJECT            ObjectHandle,\r
+  OUT TPM2B_PUBLIC              *OutPublic,\r
+  OUT TPM2B_NAME                *Name,\r
+  OUT TPM2B_NAME                *QualifiedName\r
+  );\r
+\r
 //\r
 // Help function\r
 //\r
@@ -1006,6 +1026,19 @@ GetHashSizeFromAlgo (
   IN TPMI_ALG_HASH    HashAlgo\r
   );\r
 \r
+/**\r
+  Get hash mask from algorithm.\r
+\r
+  @param[in] HashAlgo   Hash algorithm\r
+\r
+  @return Hash mask\r
+**/\r
+UINT32\r
+EFIAPI\r
+GetHashMaskFromAlgo (\r
+  IN TPMI_ALG_HASH     HashAlgo\r
+  );\r
+\r
 /**\r
   Return if hash alg is supported in HashAlgorithmMask.\r
 \r
@@ -1025,7 +1058,7 @@ IsHashAlgSupportedInHashAlgorithmMask(
 /**\r
   Copy TPML_DIGEST_VALUES into a buffer\r
 \r
-  @param[in,out] Buffer             Buffer to hold TPML_DIGEST_VALUES.\r
+  @param[in,out] Buffer             Buffer to hold copied TPML_DIGEST_VALUES compact binary.\r
   @param[in]     DigestList         TPML_DIGEST_VALUES to be copied.\r
   @param[in]     HashAlgorithmMask  HASH bits corresponding to the desired digests to copy.\r
 \r