From e89b43f50b99b5e6efb7461920b3e94ed0edb80d Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:49:25 -0400 Subject: [PATCH] changing string and other comments --- .../DeviceSecurityEventDataDeviceContext.java | 2 +- .../events/DeviceSecurityEventDataHeader.java | 2 +- .../events/DeviceSecurityEventDataHeader2.java | 13 +++++++++++++ .../events/DeviceSecurityEventDataPciContext.java | 2 +- .../eventlog/events/DeviceSecurityEventHeader.java | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataDeviceContext.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataDeviceContext.java index ce1f918e..a9863eb7 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataDeviceContext.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataDeviceContext.java @@ -49,7 +49,7 @@ public abstract class DeviceSecurityEventDataDeviceContext { * * @return a description of this structure.. */ - public String deviceContextCommonInfoToString() { + public String toString() { String dSEDdeviceContextCommonInfo = ""; dSEDdeviceContextCommonInfo += "\n DeviceSecurityEventData Device Info:"; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader.java index 9a598000..3c9ac444 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader.java @@ -92,7 +92,7 @@ public class DeviceSecurityEventDataHeader extends DeviceSecurityEventHeader { public String toString() { String dsedHeaderInfo = ""; - dsedHeaderInfo += headerCommonInfoToString(); + dsedHeaderInfo += super.toString(); String spdmHashAlgoStr = SpdmHa.tcgAlgIdToString(spdmHashAlgo); dsedHeaderInfo += "\n SPDM Hash Algorithm = " + spdmHashAlgoStr; dsedHeaderInfo += "\n SPDM Measurement Block:"; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader2.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader2.java index 0e372ea8..8e7589a9 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader2.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventDataHeader2.java @@ -1,9 +1,22 @@ package hirs.utils.tpm.eventlog.events; +import hirs.utils.tpm.eventlog.spdm.SpdmHa; + // Placeholder for Header2 data structure. public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventHeader { public DeviceSecurityEventDataHeader2(final byte[] dSEDbytes) { } + + /** + * Returns a human readable description of the data within this structure. + * + * @return a description of this structure. + */ + public String toString() { + String dsedHeader2Info = ""; + + return dsedHeader2Info; + } } 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 194d0e12..ed8f4c89 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 @@ -106,7 +106,7 @@ public class DeviceSecurityEventDataPciContext extends DeviceSecurityEventDataDe public String toString() { String dSEDpciContextInfo = ""; - dSEDpciContextInfo += deviceContextCommonInfoToString(); + dSEDpciContextInfo += super.toString(); dSEDpciContextInfo += "\n Device Type = PCI"; dSEDpciContextInfo += "\n VendorID = 0x" + vendorId; dSEDpciContextInfo += "\n DeviceID = 0x" + deviceId; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventHeader.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventHeader.java index c254eec3..b7192054 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventHeader.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/DeviceSecurityEventHeader.java @@ -203,7 +203,7 @@ public abstract class DeviceSecurityEventHeader { * * @return a description of this structure. */ - public String headerCommonInfoToString() { + public String toString() { String dsedHeaderCommonInfo = ""; dsedHeaderCommonInfo += "\n SPDM Device Type = " + deviceTypeToString(deviceType);