diff options
author | Zhang, Chao B <chao.b.zhang@intel.com> | 2018-07-21 11:20:24 +0800 |
---|---|---|
committer | Zhang, Chao B <chao.b.zhang@intel.com> | 2018-07-23 08:36:12 +0800 |
commit | d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3 (patch) | |
tree | 47ba812148d50a0f60676117d877aa707d02f7d2 /SecurityPkg | |
parent | 5da2c9b27a2a0271c933d030b8757563dd53c391 (diff) | |
download | edk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.zip edk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.tar.gz edk2-d9e206d4bf9124fe526baaa0ec56a7d2316ca6b3.tar.bz2 |
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')
-rw-r--r-- | SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c index 8c56a71..3aa0348 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,
|