Current IsHashAlgSupportedInHashAlgorithmMask is only an internal
function, this patch makes it external for coming consumer.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Chao Zhang <chao.b.zh...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.z...@intel.com>
Reviewed-by: Jiewen Yao <jiewen....@intel.com>
---
 SecurityPkg/Include/Library/Tpm2CommandLib.h  | 16 ++++++++++++++++
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c |  1 +
 2 files changed, 17 insertions(+)

diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h 
b/SecurityPkg/Include/Library/Tpm2CommandLib.h
index 9a1dd8d8aceb..85a4c65e0263 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -1007,6 +1007,22 @@ GetHashSizeFromAlgo (
   );
 
 /**
+  Return if hash alg is supported in HashAlgorithmMask.
+
+  @param HashAlg            Hash algorithm to be checked.
+  @param HashAlgorithmMask  Bitfield of allowed hash algorithms.
+
+  @retval TRUE  Hash algorithm is supported.
+  @retval FALSE Hash algorithm is not supported.
+**/
+BOOLEAN
+EFIAPI
+IsHashAlgSupportedInHashAlgorithmMask(
+  IN TPMI_ALG_HASH  HashAlg,
+  IN UINT32         HashAlgorithmMask
+  );
+
+/**
   Copy TPML_DIGEST_VALUES into a buffer
 
   @param[in,out] Buffer             Buffer to hold TPML_DIGEST_VALUES.
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
index be95fd69b3dd..95d4f7c84ce9 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
@@ -175,6 +175,7 @@ CopyAuthSessionResponse (
   @retval FALSE Hash algorithm is not supported.
 **/
 BOOLEAN
+EFIAPI
 IsHashAlgSupportedInHashAlgorithmMask(
   IN TPMI_ALG_HASH  HashAlg,
   IN UINT32         HashAlgorithmMask
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to