diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java index 1957eea4..9edc08ce 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java @@ -206,10 +206,10 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator { } if (passed) { - TCGEventLog logProcessor; + TCGEventLog expectedEventLog; try { - logProcessor = new TCGEventLog(supportReferenceManifest.getRimBytes()); - baseline = logProcessor.getExpectedPCRValues(); + expectedEventLog = new TCGEventLog(supportReferenceManifest.getRimBytes()); + baseline = expectedEventLog.getExpectedPCRValues(); } catch (CertificateException cEx) { log.error(cEx); } catch (NoSuchAlgorithmException noSaEx) { @@ -242,21 +242,21 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator { // part 2 of firmware validation check: bios measurements // vs baseline tcg event log // find the measurement - TCGEventLog eventLog; + TCGEventLog actualEventLog; LinkedList failedPcrValues = new LinkedList<>(); - List eventValue; - HashMap eventValueMap = new HashMap<>(); + List rimIntegrityMeasurements; + HashMap expectedEventLogRecords = new HashMap<>(); try { if (measurement.getDeviceName().equals(hostName)) { - eventLog = new TCGEventLog(measurement.getRimBytes()); - eventValue = referenceDigestValueRepository + actualEventLog = new TCGEventLog(measurement.getRimBytes()); + rimIntegrityMeasurements = referenceDigestValueRepository .findValuesByBaseRimId(baseReferenceManifest.getId()); - for (ReferenceDigestValue rdv : eventValue) { - eventValueMap.put(rdv.getDigestValue(), rdv); + for (ReferenceDigestValue rdv : rimIntegrityMeasurements) { + expectedEventLogRecords.put(rdv.getDigestValue(), rdv); } failedPcrValues.addAll(pcrValidator.validateTpmEvents( - eventLog, eventValueMap, policySettings)); + actualEventLog, expectedEventLogRecords, policySettings)); } } catch (CertificateException cEx) { log.error(cEx);