From b04e038869af63b570b00c8bfd88c02039a91005 Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Fri, 10 May 2024 20:40:40 -0400 Subject: [PATCH] added function to check emptiness of file handle --- .../java/hirs/utils/tpm/eventlog/uefi/UefiGuid.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiGuid.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiGuid.java index 5eacf3dd..d4d97370 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiGuid.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiGuid.java @@ -101,6 +101,17 @@ public class UefiGuid { return UefiConstants.SIZE_16; } + /** + * + * Checks whether the handle to the file needed to look up the UUID is valid. If empty, + * this likely means the file was not accessible to due to existence or permissions. + * + * @return true if the reference to the file handle needed to look up the UUID is empty + */ + public boolean isUefiVendorRefEmpty() { + return uefiVendorRef.isEmpty(); + } + /** * Returns a String that represents a specification name referenced by the * EFI_CONFIGURATION_TABLE VendorGUID field. For structure of