From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4B11381EDC for ; Thu, 17 Nov 2016 21:57:48 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 17 Nov 2016 21:57:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,655,1473145200"; d="scan'208";a="1086940579" Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.9]) by fmsmga002.fm.intel.com with ESMTP; 17 Nov 2016 21:57:51 -0800 From: Star Zeng To: edk2-devel@lists.01.org Cc: Star Zeng , Jiewen Yao , Chao Zhang Date: Fri, 18 Nov 2016 13:57:45 +0800 Message-Id: <1479448668-68452-2-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1479448668-68452-1-git-send-email-star.zeng@intel.com> References: <1479448668-68452-1-git-send-email-star.zeng@intel.com> Subject: [PATCH V2 1/4] SecurityPkg TPM2: Make IsHashAlgSupportedInHashAlgorithmMask external X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 05:57:48 -0000 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 --- 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