mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-22 22:32:27 +00:00
IdentityClaimProcessor rename sourcedValues -> expectedValues, logProcessor -> eventLog
This commit is contained in:
parent
5250d648bf
commit
4af1c0a726
@ -611,11 +611,11 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
List<SupportReferenceManifest> patchRims = new ArrayList<>();
|
List<SupportReferenceManifest> patchRims = new ArrayList<>();
|
||||||
List<SupportReferenceManifest> dbSupportRims = this.referenceManifestRepository
|
List<SupportReferenceManifest> dbSupportRims = this.referenceManifestRepository
|
||||||
.getSupportByManufacturerModel(manufacturer, model);
|
.getSupportByManufacturerModel(manufacturer, model);
|
||||||
List<ReferenceDigestValue> sourcedValues = referenceDigestValueRepository
|
List<ReferenceDigestValue> expectedValues = referenceDigestValueRepository
|
||||||
.findByManufacturerAndModel(manufacturer, model);
|
.findByManufacturerAndModel(manufacturer, model);
|
||||||
|
|
||||||
Map<String, ReferenceDigestValue> digestValueMap = new HashMap<>();
|
Map<String, ReferenceDigestValue> digestValueMap = new HashMap<>();
|
||||||
sourcedValues.stream().forEach((rdv) -> {
|
expectedValues.stream().forEach((rdv) -> {
|
||||||
digestValueMap.put(rdv.getDigestValue(), rdv);
|
digestValueMap.put(rdv.getDigestValue(), rdv);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -634,9 +634,9 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
&& referenceDigestValueRepository.findBySupportRimHash(baseSupportRim.getHexDecHash())
|
&& referenceDigestValueRepository.findBySupportRimHash(baseSupportRim.getHexDecHash())
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
TCGEventLog logProcessor = new TCGEventLog(baseSupportRim.getRimBytes());
|
TCGEventLog eventLog = new TCGEventLog(baseSupportRim.getRimBytes());
|
||||||
ReferenceDigestValue rdv;
|
ReferenceDigestValue rdv;
|
||||||
for (TpmPcrEvent tpe : logProcessor.getEventList()) {
|
for (TpmPcrEvent tpe : eventLog.getEventList()) {
|
||||||
rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(),
|
rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(),
|
||||||
baseSupportRim.getId(), manufacturer, model, tpe.getPcrIndex(),
|
baseSupportRim.getId(), manufacturer, model, tpe.getPcrIndex(),
|
||||||
tpe.getEventDigestStr(), baseSupportRim.getHexDecHash(),
|
tpe.getEventDigestStr(), baseSupportRim.getHexDecHash(),
|
||||||
@ -648,8 +648,8 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
// since I have the base already I don't have to care about the backward
|
// since I have the base already I don't have to care about the backward
|
||||||
// linkage
|
// linkage
|
||||||
for (SupportReferenceManifest supplemental : supplementalRims) {
|
for (SupportReferenceManifest supplemental : supplementalRims) {
|
||||||
logProcessor = new TCGEventLog(supplemental.getRimBytes());
|
eventLog = new TCGEventLog(supplemental.getRimBytes());
|
||||||
for (TpmPcrEvent tpe : logProcessor.getEventList()) {
|
for (TpmPcrEvent tpe : eventLog.getEventList()) {
|
||||||
// all RDVs will have the same base rim
|
// all RDVs will have the same base rim
|
||||||
rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(),
|
rdv = new ReferenceDigestValue(baseSupportRim.getAssociatedRim(),
|
||||||
supplemental.getId(), manufacturer, model, tpe.getPcrIndex(),
|
supplemental.getId(), manufacturer, model, tpe.getPcrIndex(),
|
||||||
@ -683,8 +683,8 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
ReferenceDigestValue dbRdv;
|
ReferenceDigestValue dbRdv;
|
||||||
String patchedValue;
|
String patchedValue;
|
||||||
for (SupportReferenceManifest patch : patchRims) {
|
for (SupportReferenceManifest patch : patchRims) {
|
||||||
logProcessor = new TCGEventLog(patch.getRimBytes());
|
eventLog = new TCGEventLog(patch.getRimBytes());
|
||||||
for (TpmPcrEvent tpe : logProcessor.getEventList()) {
|
for (TpmPcrEvent tpe : eventLog.getEventList()) {
|
||||||
patchedValue = tpe.getEventDigestStr();
|
patchedValue = tpe.getEventDigestStr();
|
||||||
dbRdv = digestValueMap.get(patchedValue);
|
dbRdv = digestValueMap.get(patchedValue);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user