changing string and other comments

This commit is contained in:
iadgovuser58 2024-04-29 11:49:25 -04:00 committed by chubtub
parent 9151d03a18
commit e89b43f50b
5 changed files with 17 additions and 4 deletions

View File

@ -49,7 +49,7 @@ public abstract class DeviceSecurityEventDataDeviceContext {
* *
* @return a description of this structure.. * @return a description of this structure..
*/ */
public String deviceContextCommonInfoToString() { public String toString() {
String dSEDdeviceContextCommonInfo = ""; String dSEDdeviceContextCommonInfo = "";
dSEDdeviceContextCommonInfo += "\n DeviceSecurityEventData Device Info:"; dSEDdeviceContextCommonInfo += "\n DeviceSecurityEventData Device Info:";

View File

@ -92,7 +92,7 @@ public class DeviceSecurityEventDataHeader extends DeviceSecurityEventHeader {
public String toString() { public String toString() {
String dsedHeaderInfo = ""; String dsedHeaderInfo = "";
dsedHeaderInfo += headerCommonInfoToString(); dsedHeaderInfo += super.toString();
String spdmHashAlgoStr = SpdmHa.tcgAlgIdToString(spdmHashAlgo); String spdmHashAlgoStr = SpdmHa.tcgAlgIdToString(spdmHashAlgo);
dsedHeaderInfo += "\n SPDM Hash Algorithm = " + spdmHashAlgoStr; dsedHeaderInfo += "\n SPDM Hash Algorithm = " + spdmHashAlgoStr;
dsedHeaderInfo += "\n SPDM Measurement Block:"; dsedHeaderInfo += "\n SPDM Measurement Block:";

View File

@ -1,9 +1,22 @@
package hirs.utils.tpm.eventlog.events; package hirs.utils.tpm.eventlog.events;
import hirs.utils.tpm.eventlog.spdm.SpdmHa;
// Placeholder for Header2 data structure. // Placeholder for Header2 data structure.
public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventHeader { public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventHeader {
public DeviceSecurityEventDataHeader2(final byte[] dSEDbytes) { 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;
}
} }

View File

@ -106,7 +106,7 @@ public class DeviceSecurityEventDataPciContext extends DeviceSecurityEventDataDe
public String toString() { public String toString() {
String dSEDpciContextInfo = ""; String dSEDpciContextInfo = "";
dSEDpciContextInfo += deviceContextCommonInfoToString(); dSEDpciContextInfo += super.toString();
dSEDpciContextInfo += "\n Device Type = PCI"; dSEDpciContextInfo += "\n Device Type = PCI";
dSEDpciContextInfo += "\n VendorID = 0x" + vendorId; dSEDpciContextInfo += "\n VendorID = 0x" + vendorId;
dSEDpciContextInfo += "\n DeviceID = 0x" + deviceId; dSEDpciContextInfo += "\n DeviceID = 0x" + deviceId;

View File

@ -203,7 +203,7 @@ public abstract class DeviceSecurityEventHeader {
* *
* @return a description of this structure. * @return a description of this structure.
*/ */
public String headerCommonInfoToString() { public String toString() {
String dsedHeaderCommonInfo = ""; String dsedHeaderCommonInfo = "";
dsedHeaderCommonInfo += "\n SPDM Device Type = " + deviceTypeToString(deviceType); dsedHeaderCommonInfo += "\n SPDM Device Type = " + deviceTypeToString(deviceType);