From 6f0553fe3fe0db68eb30533f009b18f1609703c1 Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:50:15 -0400 Subject: [PATCH] debugging SLF4J warning --- .../DeviceSecurityEventDataPciContext.java | 28 +++++++++---------- .../events/EvEfiSpdmDeviceSecurityEvent.java | 28 +++++++++---------- .../events/NvIndexInstanceEventLogData.java | 16 +++++------ .../src/main/java/hirs/tcg_eventlog/Main.java | 8 +++--- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java index ff90af3d..52dda706 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataPciContext.java @@ -113,21 +113,21 @@ public class DeviceSecurityEventDataPciContext extends DeviceSecurityEventDataDe dSEDpciContextInfo += super.toString(); dSEDpciContextInfo += " Device Type = PCI\n"; - dSEDpciContextInfo += " Vendor = " + translateVendor(vendorId) + "\n"; - dSEDpciContextInfo += " Device = " + translateDevice(vendorId, deviceId) + "\n"; - dSEDpciContextInfo += " RevisionID = " + revisionId + "\n"; +// dSEDpciContextInfo += " Vendor = " + translateVendor(vendorId) + "\n"; +// dSEDpciContextInfo += " Device = " + translateDevice(vendorId, deviceId) + "\n"; +// dSEDpciContextInfo += " RevisionID = " + revisionId + "\n"; - List classCodeList = translateDeviceClass(classCode); - dSEDpciContextInfo += " Device Class: \n"; - if(classCodeList.size() == 3) { - dSEDpciContextInfo += " Class = " + classCodeList.get(0) + "\n"; - dSEDpciContextInfo += " Subclass = " + classCodeList.get(1) + "\n"; - dSEDpciContextInfo += " Programming Interface = " + classCodeList.get(2) + "\n"; - } else { - dSEDpciContextInfo += " ** Class code could not be determined **"; - } - dSEDpciContextInfo += " SubsystemVendor = " + translateVendor(subsystemVendorId) + "\n"; - dSEDpciContextInfo += " Subsystem = " + translateDevice(subsystemVendorId, subsystemId) + "\n"; +// List classCodeList = translateDeviceClass(classCode); +// dSEDpciContextInfo += " Device Class: \n"; +// if(classCodeList.size() == 3) { +// dSEDpciContextInfo += " Class = " + classCodeList.get(0) + "\n"; +// dSEDpciContextInfo += " Subclass = " + classCodeList.get(1) + "\n"; +// dSEDpciContextInfo += " Programming Interface = " + classCodeList.get(2) + "\n"; +// } else { +// dSEDpciContextInfo += " ** Class code could not be determined **"; +// } +// dSEDpciContextInfo += " SubsystemVendor = " + translateVendor(subsystemVendorId) + "\n"; +// dSEDpciContextInfo += " Subsystem = " + translateDevice(subsystemVendorId, subsystemId) + "\n"; return dSEDpciContextInfo; } 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 ce0e0e9a..56b0d5f1 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 d371fb49..2022b9aa 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 " diff --git a/tools/tcg_eventlog_tool/src/main/java/hirs/tcg_eventlog/Main.java b/tools/tcg_eventlog_tool/src/main/java/hirs/tcg_eventlog/Main.java index 39a24549..c87bb5c6 100644 --- a/tools/tcg_eventlog_tool/src/main/java/hirs/tcg_eventlog/Main.java +++ b/tools/tcg_eventlog_tool/src/main/java/hirs/tcg_eventlog/Main.java @@ -1,5 +1,9 @@ package hirs.tcg_eventlog; +import hirs.utils.HexUtils; +import hirs.utils.tpm.eventlog.TCGEventLog; +import hirs.utils.tpm.eventlog.TpmPcrEvent; + import java.io.FileOutputStream; import java.io.IOException; import java.nio.charset.Charset; @@ -12,10 +16,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import hirs.utils.tpm.eventlog.TCGEventLog; -import hirs.utils.tpm.eventlog.TpmPcrEvent; -import hirs.utils.HexUtils; - import static hirs.utils.tpm.eventlog.uefi.UefiConstants.FILESTATUS_FROM_CODE; import static hirs.utils.tpm.eventlog.uefi.UefiConstants.FILESTATUS_NOT_ACCESSIBLE;