From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Chao Zhang <chao.b.zhang@intel.com>
Subject: [PATCH V2 1/4] SecurityPkg TPM2: Make IsHashAlgSupportedInHashAlgorithmMask external
Date: Fri, 18 Nov 2016 13:57:45 +0800 [thread overview]
Message-ID: <1479448668-68452-2-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1479448668-68452-1-git-send-email-star.zeng@intel.com>
Current IsHashAlgSupportedInHashAlgorithmMask is only an internal
function, this patch makes it external for coming consumer.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@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
next prev parent reply other threads:[~2016-11-18 5:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 5:57 [PATCH V2 0/4] Tcg2Dxe: Filter inactive digest in event2 log from PEI HOB Star Zeng
2016-11-18 5:57 ` Star Zeng [this message]
2016-11-18 5:57 ` [PATCH V2 2/4] SecurityPkg TPM2: Add GetHashMaskFromAlgo() into Tpm2CommandLib Star Zeng
2016-11-18 5:57 ` [PATCH V2 3/4] SecurityPkg TPM2: Update desc for param Buffer of GetDigestListSize() Star Zeng
2016-11-18 5:57 ` [PATCH V2 4/4] SecurityPkg Tcg2Dxe: Filter inactive digest in event2 log from PEI HOB Star Zeng
2016-11-18 7:04 ` [PATCH V2 0/4] " Zhang, Chao B
2016-11-18 7:46 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479448668-68452-2-git-send-email-star.zeng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox