From 9054822347b7d543ea38aabebb0fd575d731d9d8 Mon Sep 17 00:00:00 2001 From: iadgovuser58 <124906646+iadgovuser58@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:16:52 -0400 Subject: [PATCH] fixing NoAction event --- .../utils/tpm/eventlog/events/EvNoAction.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java index 2e223bf7..815f5c75 100644 --- a/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java +++ b/HIRS_Utils/src/main/java/hirs/utils/tpm/eventlog/events/EvNoAction.java @@ -80,8 +80,8 @@ public class EvNoAction { specIDEvent.getVersionMinor()); specErrataVersion = specIDEvent.getErrata(); } else if (signature.contains("StartupLocality")) { - noActionInfo += " Signature = StartupLocality: "; - noActionInfo += "\n " + getLocality(eventData); + noActionInfo += " Signature = StartupLocality"; + noActionInfo += "\n StartupLocality = " + getLocality(eventData); } else if (signature.contains("NvIndexInstance")) { NvIndexInstanceEventLogData nvIndexInstanceEvent = new NvIndexInstanceEventLogData(eventData); noActionInfo += nvIndexInstanceEvent.toString(); @@ -118,24 +118,25 @@ public class EvNoAction { } private String getLocality(final byte[] eventData) { + String localityInfo = ""; byte[] localityBytes = new byte[1]; - System.arraycopy(eventData, 2, localityBytes, 0, 1); + System.arraycopy(eventData, 16, localityBytes, 0, 1); int locality = HexUtils.leReverseInt(localityBytes); switch (locality) { case 0: - noActionInfo += "Locality 0 without an H-CRTM sequence"; + localityInfo += "Locality 0 without an H-CRTM sequence"; break; case 3: - noActionInfo += "Locality 3 without an H-CRTM sequence"; + localityInfo += "Locality 3 without an H-CRTM sequence"; break; case 4: - noActionInfo += "Locality 4 with an H-CRTM sequence initialized"; + localityInfo += "Locality 4 with an H-CRTM sequence initialized"; break; default: - noActionInfo += "Startup Locality unknown"; + localityInfo += "Unknown"; } - return noActionInfo; + return localityInfo; } /**