changing string and other comments

This commit is contained in:
iadgovuser58 2024-04-29 11:49:25 -04:00
parent 766d1eb3e0
commit 9f097f391c
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..
*/
public String deviceContextCommonInfoToString() {
public String toString() {
String dSEDdeviceContextCommonInfo = "";
dSEDdeviceContextCommonInfo += "\n DeviceSecurityEventData Device Info:";

View File

@ -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:";

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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);