summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library
diff options
context:
space:
mode:
authorZhang, Chao B <chao.b.zhang@intel.com>2018-07-21 11:20:24 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2018-07-23 08:36:12 +0800
commitd9e206d4bf9124fe526baaa0ec56a7d2316ca6b3 (patch)
tree47ba812148d50a0f60676117d877aa707d02f7d2 /SecurityPkg/Library
parent5da2c9b27a2a0271c933d030b8757563dd53c391 (diff)
downloadedk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.tar.gz
edk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.tar.bz2
edk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.zip
MdeModulePkg: TpmMeasureLib: Re-prioritize TCG/TCG2 protocol
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> Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/Library')
-rw-r--r--SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c23
1 files 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
@@ -184,21 +184,22 @@ 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,