diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java index ec18d1cf..29705a62 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java @@ -318,19 +318,6 @@ public class TpmPcrEvent { case EvConstants.EV_EFI_EVENT_BASE: break; case EvConstants.EV_EFI_VARIABLE_DRIVER_CONFIG: - try { - sb.append(new UefiVariable(eventContent).toString()); - } catch (CertificateException cEx) { - log.error(cEx); - sb.append(cEx.toString()); - } catch (NoSuchAlgorithmException noSaEx) { - log.error(noSaEx); - sb.append(noSaEx.toString()); - } catch (IOException ioEx) { - log.error(ioEx); - sb.append(ioEx.toString()); - } - break; case EvConstants.EV_EFI_VARIABLE_BOOT: case EvConstants.EV_EFI_VARIABLE_AUTHORITY: case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: @@ -503,26 +490,19 @@ public class TpmPcrEvent { case EvConstants.EV_EFI_EVENT_BASE: break; case EvConstants.EV_EFI_VARIABLE_DRIVER_CONFIG: - UefiVariable efiVar = new UefiVariable(content); - description += "Event Content:\n" + efiVar.toString(); - vendorTableFileStatus = efiVar.getVendorTableFileStatus(); - break; case EvConstants.EV_EFI_VARIABLE_BOOT: case EvConstants.EV_EFI_VARIABLE_AUTHORITY: case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: case EvConstants.EV_EFI_SPDM_DEVICE_AUTHORITY: - UefiVariable efiVar2 = new UefiVariable(content); - description += "Event Content:\n" + efiVar2.toString(); - vendorTableFileStatus = efiVar2.getVendorTableFileStatus(); + UefiVariable efiVar = new UefiVariable(content); + description += "Event Content:\n" + efiVar.toString(); + vendorTableFileStatus = efiVar.getVendorTableFileStatus(); break; case EvConstants.EV_EFI_BOOT_SERVICES_APPLICATION: + case EvConstants.EV_EFI_BOOT_SERVICES_DRIVER: EvEfiBootServicesApp bootServices = new EvEfiBootServicesApp(content); description += "Event Content:\n" + bootServices.toString(); break; - case EvConstants.EV_EFI_BOOT_SERVICES_DRIVER: // same as EV_EFI_BOOT_SERVICES_APP - EvEfiBootServicesApp bootDriver = new EvEfiBootServicesApp(content); - description += "Event Content:\n" + bootDriver.toString(); - break; case EvConstants.EV_EFI_RUNTIME_SERVICES_DRIVER: break; case EvConstants.EV_EFI_GPT_EVENT: @@ -542,8 +522,6 @@ public class TpmPcrEvent { case EvConstants.EV_EFI_HCRTM_EVENT: break; case EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB: - description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString(); - break; case EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG: description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString(); break; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvEfiSpdmDeviceSecurityEvent.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvEfiSpdmDeviceSecurityEvent.java index 56b0d5f1..ce0e0e9a 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvEfiSpdmDeviceSecurityEvent.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvEfiSpdmDeviceSecurityEvent.java @@ -69,25 +69,25 @@ public class EvEfiSpdmDeviceSecurityEvent { spdmInfo = " Signature = SPDM Device Sec2\n"; - if (dsedVersion.equals("0200")) { - dsed = new DeviceSecurityEventData2(eventData); - spdmInfo += dsed.toString(); - } - else { - spdmInfo += " Incompatible version for DeviceSecurityEventData2: " + dsedVersion + "\n"; - } +// if (dsedVersion.equals("0200")) { +// dsed = new DeviceSecurityEventData2(eventData); +// spdmInfo += dsed.toString(); +// } +// else { +// spdmInfo += " Incompatible version for DeviceSecurityEventData2: " + dsedVersion + "\n"; +// } } else if (dsedSignature.contains("SPDM Device Sec")) { // implies Device Security event spdmInfo = " Signature = SPDM Device Sec\n"; - if (dsedVersion.equals("0100")) { - dsed = new DeviceSecurityEventData(eventData); - spdmInfo += dsed.toString(); - } - else { - spdmInfo += " Incompatible version for DeviceSecurityEventData: " + dsedVersion + "\n"; - } +// if (dsedVersion.equals("0100")) { +// dsed = new DeviceSecurityEventData(eventData); +// spdmInfo += dsed.toString(); +// } +// else { +// spdmInfo += " Incompatible version for DeviceSecurityEventData: " + dsedVersion + "\n"; +// } } else { spdmInfo = " Signature = Undetermined value: " + dsedSignature + "\n"; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexInstanceEventLogData.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexInstanceEventLogData.java index 2022b9aa..d371fb49 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexInstanceEventLogData.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/NvIndexInstanceEventLogData.java @@ -81,14 +81,14 @@ public class NvIndexInstanceEventLogData { nvIndexInstanceInfo += " Signature = SPDM Device Sec2\n"; - if (dsedVersion.equals("0200")) { - dsed = new DeviceSecurityEventData2(dsedEventData); - nvIndexInstanceInfo += dsed.toString(); - } - else { - nvIndexInstanceInfo += " Incompatible version for DeviceSecurityEventData2: " - + dsedVersion + "\n"; - } +// if (dsedVersion.equals("0200")) { +// dsed = new DeviceSecurityEventData2(dsedEventData); +// nvIndexInstanceInfo += dsed.toString(); +// } +// else { +// nvIndexInstanceInfo += " Incompatible version for DeviceSecurityEventData2: " +// + dsedVersion + "\n"; +// } } else { nvIndexInstanceInfo = " Signature error: should be \'SPDM Device Sec2\' but is "