From 6c6892b36b61b95953399f3c1a6477b4100abe1b Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:35:59 -0400 Subject: [PATCH] updated TpmPcrEvent and EvConstants for the next 2 SPDM events --- .../java/hirs/utils/tpm/eventlog/TpmPcrEvent.java | 14 ++++++++++++++ .../utils/tpm/eventlog/events/EvConstants.java | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java index 1df953f1..9858cdee 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java @@ -395,6 +395,10 @@ public class TpmPcrEvent { sb.append(ueEx.toString()); } break; + case EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG: + break; + case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: + break; default: sb.append("Unknown Event found\n"); } @@ -561,6 +565,12 @@ public class TpmPcrEvent { case EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB: description += "Event Content:\n" + new EvEfiSpdmFirmwareBlob(content).toString(); break; + case EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG: + description += "Event Content:\n" + new EvEfiSpdmFirmwareConfig(content).toString(); + break; + case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: + description += "Event Content:\n" + new EvEfiSpdmDevicePolicy(content).toString(); + break; default: description += " Unknown Event found" + "\n"; } @@ -640,6 +650,10 @@ public class TpmPcrEvent { return "EV_EFI_VARIABLE_AUTHORITY"; } else if (event == EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB) { return "EV_EFI_SPDM_FIRMWARE_BLOB"; + } else if (event == EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG) { + return "EV_EFI_SPDM_FIRMWARE_CONFIG"; + } else if (event == EvConstants.EV_EFI_SPDM_DEVICE_POLICY) { + return "EV_EFI_SPDM_DEVICE_POLICY"; } else { return "Unknown Event ID " + event + " encountered"; } diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvConstants.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvConstants.java index aaf69776..180f02b9 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvConstants.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvConstants.java @@ -167,4 +167,12 @@ public final class EvConstants { * EFI SPDM Firmware Blob Event ID. */ public static final int EV_EFI_SPDM_FIRMWARE_BLOB = 0x800000E1; + /** + * EFI SPDM Firmware Config Event ID. + */ + public static final int EV_EFI_SPDM_FIRMWARE_CONFIG = 0x800000E2; + /** + * EFI SPDM Device Policy Event ID. + */ + public static final int EV_EFI_SPDM_DEVICE_POLICY = 0x800000E3; }