From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 5D94581E08 for ; Thu, 17 Nov 2016 01:29:36 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 17 Nov 2016 01:29:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,653,1473145200"; d="scan'208";a="32314051" Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.9]) by orsmga005.jf.intel.com with ESMTP; 17 Nov 2016 01:29:32 -0800 From: Star Zeng To: edk2-devel@lists.01.org Cc: Star Zeng , Jiewen Yao , Chao Zhang Date: Thu, 17 Nov 2016 17:29:28 +0800 Message-Id: <1479374969-63472-2-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1479374969-63472-1-git-send-email-star.zeng@intel.com> References: <1479374969-63472-1-git-send-email-star.zeng@intel.com> Subject: [PATCH 1/2] 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: Thu, 17 Nov 2016 09:29:36 -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 --- 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