mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-04-07 19:34:27 +00:00
Updated RIM lookup to use manufacturer and model instead of deviceName
This commit is contained in:
parent
c99622bbea
commit
fc3f59adce
@ -393,10 +393,11 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe
|
||||
ReferenceDigestRecord digestRecord = null;
|
||||
|
||||
baseReferenceManifests = BaseReferenceManifest.select(referenceManifestManager)
|
||||
.byDeviceName(device.getDeviceInfo().getNetworkInfo().getHostname()).getRIMs();
|
||||
.byModel(model).getRIMs();
|
||||
|
||||
for (BaseReferenceManifest bRim : baseReferenceManifests) {
|
||||
if (!bRim.isSwidSupplemental() && !bRim.isSwidPatch()) {
|
||||
if (bRim.getPlatformManufacturer().equals(manufacturer)
|
||||
&& !bRim.isSwidSupplemental() && !bRim.isSwidPatch()) {
|
||||
baseReferenceManifest = bRim;
|
||||
}
|
||||
}
|
||||
@ -408,6 +409,11 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe
|
||||
} else {
|
||||
measurement = EventLogMeasurements.select(referenceManifestManager)
|
||||
.byHexDecHash(baseReferenceManifest.getEventLogHash()).getRIM();
|
||||
|
||||
if (measurement == null) {
|
||||
measurement = EventLogMeasurements.select(referenceManifestManager)
|
||||
.byModel(baseReferenceManifest.getPlatformModel()).getRIM();
|
||||
}
|
||||
}
|
||||
|
||||
if (measurement == null) {
|
||||
|
@ -110,6 +110,17 @@ public class BaseReferenceManifest extends ReferenceManifest {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the platform model that rims must have to be considered
|
||||
* as matching.
|
||||
* @param model string for the model
|
||||
* @return this instance
|
||||
*/
|
||||
public Selector byModel(final String model) {
|
||||
setFieldValue(PLATFORM_MODEL, model);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the device name that rims must have to be considered
|
||||
* as matching.
|
||||
|
@ -61,6 +61,17 @@ public class EventLogMeasurements extends ReferenceManifest {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the platform model that rims must have to be considered
|
||||
* as matching.
|
||||
* @param model string for the model
|
||||
* @return this instance
|
||||
*/
|
||||
public Selector byModel(final String model) {
|
||||
setFieldValue(PLATFORM_MODEL, model);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the device name that rims must have to be considered
|
||||
* as matching.
|
||||
|
Loading…
x
Reference in New Issue
Block a user