cleaned up NoAction event

This commit is contained in:
iadgovuser58 2024-07-18 11:14:09 -04:00
parent 9054822347
commit 181ca4993e
2 changed files with 1 additions and 17 deletions

View File

@ -261,25 +261,12 @@ public class TpmPcrEvent {
case EvConstants.EV_UNUSED: case EvConstants.EV_UNUSED:
break; break;
case EvConstants.EV_NO_ACTION: case EvConstants.EV_NO_ACTION:
// EvNoAction noAction = null;
// try {
// noAction = new EvNoAction(eventContent);
EvNoAction noAction = new EvNoAction(eventContent); EvNoAction noAction = new EvNoAction(eventContent);
sb.append(noAction.toString()); sb.append(noAction.toString());
if (noAction.isSpecIDEvent()) { if (noAction.isSpecIDEvent()) {
// // this should be in the constructor
// EvEfiSpecIdEvent specID = noAction.getSpecIDEvent();
// specVersion = String.format("%s.%s",
// specID.getVersionMajor(),
// specID.getVersionMinor());
// specErrataVersion = specID.getErrata();
specVersion = noAction.getSpecVersion(); specVersion = noAction.getSpecVersion();
specErrataVersion = noAction.getSpecErrataVersion(); specErrataVersion = noAction.getSpecErrataVersion();
} }
// } catch (UnsupportedEncodingException ueEx) {
// log.error(ueEx);
// sb.append(ueEx.toString());
// }
break; break;
case EvConstants.EV_SEPARATOR: case EvConstants.EV_SEPARATOR:
if (EvPostCode.isAscii(eventContent) if (EvPostCode.isAscii(eventContent)
@ -459,9 +446,6 @@ public class TpmPcrEvent {
EvNoAction noAction = new EvNoAction(content); EvNoAction noAction = new EvNoAction(content);
description += "Event Content:\n" + noAction.toString(); description += "Event Content:\n" + noAction.toString();
if (noAction.isSpecIDEvent()) { if (noAction.isSpecIDEvent()) {
// EvEfiSpecIdEvent specID = noAction.getSpecIDEvent();
// specVersion = specID.getVersionMajor() + "." + specID.getVersionMinor();
// specErrataVersion = specID.getErrata();
specVersion = noAction.getSpecVersion(); specVersion = noAction.getSpecVersion();
specErrataVersion = noAction.getSpecErrataVersion(); specErrataVersion = noAction.getSpecErrataVersion();
} }

View File

@ -46,7 +46,7 @@ public class EvSCrtmVersion {
} else if (EvPostCode.isAscii(data)) { } else if (EvPostCode.isAscii(data)) {
description = new String(data, StandardCharsets.UTF_8); description = new String(data, StandardCharsets.UTF_8);
} else { } else {
description = "Unknown Version format"; description = " Unknown Version format";
} }
} }
return (description); return (description);