mirror of https://github.com/acidanthera/audk.git
SecurityPkg: add TIS sanity check (tpm2)
The code blindly assumes a TIS interface is present in case both CRB and FIFO checks fail. Check the InterfaceType for TIS instead and only return Tpm2PtpInterfaceTis in case it matches, Tpm2PtpInterfaceMax otherwise. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
23c71536ef
commit
832fbc6e32
|
@ -464,7 +464,11 @@ Tpm2GetPtpInterface (
|
|||
return Tpm2PtpInterfaceFifo;
|
||||
}
|
||||
|
||||
return Tpm2PtpInterfaceTis;
|
||||
if (InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) {
|
||||
return Tpm2PtpInterfaceTis;
|
||||
}
|
||||
|
||||
return Tpm2PtpInterfaceMax;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue