mirror of https://github.com/acidanthera/audk.git
SecurityPkg/HashLibTdx: Return EFI_UNSUPPORTED if it is not Tdx guest
HashLibTdx is designed for the Tdx guest. So if is not a Tdx guest, return EFI_UNSUPPORTED in RegisterHashInterfaceLib. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
16d97fa601
commit
05e57cc9ce
|
@ -186,7 +186,13 @@ RegisterHashInterfaceLib (
|
|||
IN HASH_INTERFACE *HashInterface
|
||||
)
|
||||
{
|
||||
ASSERT (TdIsEnabled ());
|
||||
//
|
||||
// HashLibTdx is designed for Tdx guest. So if it is not Tdx guest,
|
||||
// return EFI_UNSUPPORTED.
|
||||
//
|
||||
if (!TdIsEnabled ()) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Only SHA384 is allowed.
|
||||
|
|
Loading…
Reference in New Issue