mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-28 08:48:59 +00:00
spdm processing
This commit is contained in:
parent
2cb2437ca0
commit
92dffcf0f0
BIN
0_temp/binary_bios_measurements_addEvt11asSPDMFirmwareBlob
Normal file
BIN
0_temp/binary_bios_measurements_addEvt11asSPDMFirmwareBlob
Normal file
Binary file not shown.
@ -5,6 +5,7 @@ import hirs.utils.tpm.eventlog.events.EvCompactHash;
|
||||
import hirs.utils.tpm.eventlog.events.EvConstants;
|
||||
import hirs.utils.tpm.eventlog.events.EvEfiGptPartition;
|
||||
import hirs.utils.tpm.eventlog.events.EvEfiHandoffTable;
|
||||
import hirs.utils.tpm.eventlog.events.EvEfiSpdmFirmwareBlob;
|
||||
import hirs.utils.tpm.eventlog.events.EvEfiSpecIdEvent;
|
||||
import hirs.utils.tpm.eventlog.events.EvEventTag;
|
||||
import hirs.utils.tpm.eventlog.events.EvIPL;
|
||||
@ -534,6 +535,8 @@ public class TpmPcrEvent {
|
||||
description += "Event Content:\n" + new UefiVariable(content).toString();
|
||||
break;
|
||||
case EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB:
|
||||
EvEfiSpdmFirmwareBlob efiSpdmFwBlob = new EvEfiSpdmFirmwareBlob(content);
|
||||
description += "Event Content:\n" + efiSpdmFwBlob.toString();
|
||||
default:
|
||||
description += " Unknown Event found" + "\n";
|
||||
}
|
||||
@ -549,6 +552,7 @@ public class TpmPcrEvent {
|
||||
*/
|
||||
private static String eventString(final long event) {
|
||||
|
||||
System.out.println("XXXX " + event);
|
||||
if (event == EvConstants.EV_PREBOOT_CERT) {
|
||||
return "EV_PREBOOT_CERT";
|
||||
} else if (event == EvConstants.EV_POST_CODE) {
|
||||
|
@ -113,18 +113,38 @@ public class DeviceSecurityEventData {
|
||||
}
|
||||
dSEDdeviceContext = new DeviceSecurityEventDataDeviceContext(dSEDbytes, byteOffset);
|
||||
|
||||
if (version == "1") {
|
||||
dSEDinfo =+
|
||||
dSEDataHeader.getDSEDheaderInfo();
|
||||
dSEDinfo =+
|
||||
dSEDdeviceContext.getdSEDdeviceContextInfo();
|
||||
} else if (version == "2") {
|
||||
dSEDinfo =+
|
||||
dSEDheader.getDSEDheaderInfo();
|
||||
dSEDinfo =+
|
||||
dSEDsubHeader.getDSEDsubHeaderInfo();
|
||||
dSEDinfo =+
|
||||
dSEDdeviceContext.getDSEDdeviceContextInfo();
|
||||
}
|
||||
// if (version == "1") {
|
||||
// dSEDinfo =+
|
||||
// dSEDataHeader.getDSEDheaderInfo();
|
||||
// dSEDinfo =+
|
||||
// dSEDdeviceContext.getdSEDdeviceContextInfo();
|
||||
// } else if (version == "2") {
|
||||
// dSEDinfo =+
|
||||
// dSEDheader.getDSEDheaderInfo();
|
||||
// dSEDinfo =+
|
||||
// dSEDsubHeader.getDSEDsubHeaderInfo();
|
||||
// dSEDinfo =+
|
||||
// dSEDdeviceContext.getDSEDdeviceContextInfo();
|
||||
// }
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String specInfo = "";
|
||||
|
||||
specInfo += " Signature = SPDM Device Sec : ";
|
||||
// if (specIDEvent.isCryptoAgile()) {
|
||||
// specInfo += "Log format is Crypto Agile\n";
|
||||
// } else {
|
||||
// specInfo += "Log format is SHA 1 (NOT Crypto Agile)\n";
|
||||
// }
|
||||
// specInfo += " Platform Profile Specification version = "
|
||||
// + specIDEvent.getVersionMajor() + "." + specIDEvent.getVersionMinor()
|
||||
// + " using errata version " + specIDEvent.getErrata();
|
||||
// specInfo += DeviceSecurityEventData.toString();
|
||||
// } else {
|
||||
// specInfo = "EV_EFI_SPDM_FIRMWARE_BLOB event named " + signature
|
||||
// + " encountered but support for processing it has not been added to this application.\n";
|
||||
// }
|
||||
return specInfo;
|
||||
}
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ public class EvEfiSpdmFirmwareBlob {
|
||||
// specInfo += " Platform Profile Specification version = "
|
||||
// + specIDEvent.getVersionMajor() + "." + specIDEvent.getVersionMinor()
|
||||
// + " using errata version " + specIDEvent.getErrata();
|
||||
// specInfo += DeviceSecurityEventData.toString();
|
||||
} else {
|
||||
specInfo = "EV_EFI_SPDM_FIRMWARE_BLOB event named " + signature
|
||||
+ " encountered but support for processing it has not been added to this application.\n";
|
||||
|
Loading…
Reference in New Issue
Block a user