From 4af1c0a726db18eadd9228f35e6df629c4504314 Mon Sep 17 00:00:00 2001 From: chubtub <43381989+chubtub@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:31:34 -0400 Subject: [PATCH] IdentityClaimProcessor rename sourcedValues -> expectedValues, logProcessor -> eventLog --- .../provision/IdentityClaimProcessor.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/IdentityClaimProcessor.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/IdentityClaimProcessor.java index 0bb294a38..edb646170 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/IdentityClaimProcessor.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/provision/IdentityClaimProcessor.java @@ -611,11 +611,11 @@ private boolean generateDigestRecords(final String manufacturer, final String mo List patchRims = new ArrayList<>(); List dbSupportRims = this.referenceManifestRepository .getSupportByManufacturerModel(manufacturer, model); - List sourcedValues = referenceDigestValueRepository + List expectedValues = referenceDigestValueRepository .findByManufacturerAndModel(manufacturer, model); Map digestValueMap = new HashMap<>(); - sourcedValues.stream().forEach((rdv) -> { + expectedValues.stream().forEach((rdv) -> { digestValueMap.put(rdv.getDigestValue(), rdv); }); @@ -634,9 +634,9 @@ private boolean generateDigestRecords(final String manufacturer, final String mo && referenceDigestValueRepository.findBySupportRimHash(baseSupportRim.getHexDecHash()) .isEmpty()) { try { - TCGEventLog logProcessor = new TCGEventLog(baseSupportRim.getRimBytes()); + TCGEventLog eventLog = new TCGEventLog(baseSupportRim.getRimBytes()); ReferenceDigestValue rdv; - for (TpmPcrEvent tpe : logProcessor.getEventList()) { + for (TpmPcrEvent tpe : eventLog.getEventList()) { rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(), baseSupportRim.getId(), manufacturer, model, tpe.getPcrIndex(), tpe.getEventDigestStr(), baseSupportRim.getHexDecHash(), @@ -648,8 +648,8 @@ private boolean generateDigestRecords(final String manufacturer, final String mo // since I have the base already I don't have to care about the backward // linkage for (SupportReferenceManifest supplemental : supplementalRims) { - logProcessor = new TCGEventLog(supplemental.getRimBytes()); - for (TpmPcrEvent tpe : logProcessor.getEventList()) { + eventLog = new TCGEventLog(supplemental.getRimBytes()); + for (TpmPcrEvent tpe : eventLog.getEventList()) { // all RDVs will have the same base rim rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(), supplemental.getId(), manufacturer, model, tpe.getPcrIndex(), @@ -683,8 +683,8 @@ private boolean generateDigestRecords(final String manufacturer, final String mo ReferenceDigestValue dbRdv; String patchedValue; for (SupportReferenceManifest patch : patchRims) { - logProcessor = new TCGEventLog(patch.getRimBytes()); - for (TpmPcrEvent tpe : logProcessor.getEventList()) { + eventLog = new TCGEventLog(patch.getRimBytes()); + for (TpmPcrEvent tpe : eventLog.getEventList()) { patchedValue = tpe.getEventDigestStr(); dbRdv = digestValueMap.get(patchedValue);