From: "Zhang, Chao B" <chao.b.zhang@intel.com>
To: edk2-devel@lists.01.org
Cc: Long, Qin <qin.long@intel.com>, Yao, Jiewen <jiewen.yao@intel.com>
Subject: [Patch 2/2] MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
Date: Sat, 21 Jul 2018 11:31:32 +0800 [thread overview]
Message-ID: <20180721033132.19752-3-chao.b.zhang@intel.com> (raw)
In-Reply-To: <20180721033132.19752-1-chao.b.zhang@intel.com>
TPM1.2 is obsoleted by TPM2.0. switch TCG/TCG2 protocol check to apply this
trend
Cc: Long, Qin <qin.long@intel.com>
Cc: Yao, Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com>
---
.../DxeTpmMeasurementLib/DxeTpmMeasurementLib.c | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
index 8c56a713d8..3aa034851d 100644
--- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
+++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
@@ -182,25 +182,26 @@ TpmMeasureAndLogData (
)
{
EFI_STATUS Status;
//
- // Try to measure using Tpm1.2 protocol
+ // Try to measure using Tpm20 protocol
//
- Status = Tpm12MeasureAndLogData(
- PcrIndex,
- EventType,
- EventLog,
- LogLen,
- HashData,
- HashDataLen
- );
+ Status = Tpm20MeasureAndLogData(
+ PcrIndex,
+ EventType,
+ EventLog,
+ LogLen,
+ HashData,
+ HashDataLen
+ );
+
if (EFI_ERROR (Status)) {
//
- // Try to measure using Tpm20 protocol
+ // Try to measure using Tpm1.2 protocol
//
- Status = Tpm20MeasureAndLogData(
+ Status = Tpm12MeasureAndLogData(
PcrIndex,
EventType,
EventLog,
LogLen,
HashData,
--
2.16.2.windows.1
next prev parent reply other threads:[~2018-07-21 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-21 3:31 [Patch 0/2] Re-prioritize TCG/TCG2 protocol Zhang, Chao B
2018-07-21 3:31 ` [Patch 1/2] MdeModulePkg: Variable: " Zhang, Chao B
2018-07-21 3:31 ` Zhang, Chao B [this message]
2018-07-21 6:16 ` [Patch 0/2] " 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=20180721033132.19752-3-chao.b.zhang@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