From: Star Zeng Date: Thu, 17 Nov 2016 08:41:08 +0000 (+0800) Subject: SecurityPkg TPM2: Make IsHashAlgSupportedInHashAlgorithmMask external X-Git-Tag: edk2-stable201903~5133 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=697c30b157c90c9c1a6c6610d73a49e4f5fd56b3;p=mirror_edk2.git SecurityPkg TPM2: Make IsHashAlgSupportedInHashAlgorithmMask external Current IsHashAlgSupportedInHashAlgorithmMask is only an internal function, this patch makes it external for coming consumer. Cc: Jiewen Yao Cc: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao Reviewed-by : Chao Zhang --- diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Include/Library/Tpm2CommandLib.h index 9a1dd8d8ac..85a4c65e02 100644 --- a/SecurityPkg/Include/Library/Tpm2CommandLib.h +++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h @@ -1006,6 +1006,22 @@ GetHashSizeFromAlgo ( IN TPMI_ALG_HASH HashAlgo ); +/** + 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 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c index be95fd69b3..95d4f7c84c 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