From 39bdd26b58850cc9f5d0301c9f30f3795bb98e27 Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Fri, 21 Jun 2024 18:32:24 -0400 Subject: [PATCH] working spdm --- .../src/main/java/hirs/utils/tpm/eventlog/TpmPcrEvent.java | 7 ++++--- .../java/hirs/utils/tpm/eventlog/uefi/UefiVariable.java | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) 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 f28b655f..4912d8d4 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 @@ -344,6 +344,7 @@ public class TpmPcrEvent { break; case EvConstants.EV_EFI_VARIABLE_BOOT: case EvConstants.EV_EFI_VARIABLE_AUTHORITY: + case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: try { sb.append(new UefiVariable(eventContent).toString()); } catch (CertificateException cEx) { @@ -397,8 +398,6 @@ public class TpmPcrEvent { sb.append(ueEx.toString()); } break; - case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: - break; default: sb.append("Unknown Event found\n"); } @@ -569,7 +568,9 @@ public class TpmPcrEvent { description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString(); break; case EvConstants.EV_EFI_SPDM_DEVICE_POLICY: - description += "Event Content:\n" + new EvEfiSpdmDevicePolicy(content).toString(); + UefiVariable efiSpdmDevPol = new UefiVariable(content); + description += "Event Content:\n" + efiSpdmDevPol.toString(); + vendorTableFileStatus = efiSpdmDevPol.getVendorTableFileStatus(); break; default: description += " Unknown Event found" + "\n"; diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiVariable.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiVariable.java index ba6607b2..57f4ec1c 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiVariable.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/uefi/UefiVariable.java @@ -128,6 +128,8 @@ public class UefiVariable { case "dbx": processSigList(uefiVariableData); break; + case "devdb": + // if it's POLICY, process Sig List; if it's AUTHORITY, process Sig Data case "Boot00": bootv = new UefiBootVariable(uefiVariableData); break;