mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-19 21:17:59 +00:00
FirmwareScvValidator rename eventLog -> expectedEventLog, eventLog -> actualEventLog, eventValue -> rimIntegrityMeasurements, eventValueMap -> expectedEventLogRecords
This commit is contained in:
parent
3e8e55a00c
commit
b7c15ee6ea
@ -206,10 +206,10 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (passed) {
|
if (passed) {
|
||||||
TCGEventLog logProcessor;
|
TCGEventLog expectedEventLog;
|
||||||
try {
|
try {
|
||||||
logProcessor = new TCGEventLog(supportReferenceManifest.getRimBytes());
|
expectedEventLog = new TCGEventLog(supportReferenceManifest.getRimBytes());
|
||||||
baseline = logProcessor.getExpectedPCRValues();
|
baseline = expectedEventLog.getExpectedPCRValues();
|
||||||
} catch (CertificateException cEx) {
|
} catch (CertificateException cEx) {
|
||||||
log.error(cEx);
|
log.error(cEx);
|
||||||
} catch (NoSuchAlgorithmException noSaEx) {
|
} catch (NoSuchAlgorithmException noSaEx) {
|
||||||
@ -242,21 +242,21 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator {
|
|||||||
// part 2 of firmware validation check: bios measurements
|
// part 2 of firmware validation check: bios measurements
|
||||||
// vs baseline tcg event log
|
// vs baseline tcg event log
|
||||||
// find the measurement
|
// find the measurement
|
||||||
TCGEventLog eventLog;
|
TCGEventLog actualEventLog;
|
||||||
LinkedList<TpmPcrEvent> failedPcrValues = new LinkedList<>();
|
LinkedList<TpmPcrEvent> failedPcrValues = new LinkedList<>();
|
||||||
List<ReferenceDigestValue> eventValue;
|
List<ReferenceDigestValue> rimIntegrityMeasurements;
|
||||||
HashMap<String, ReferenceDigestValue> eventValueMap = new HashMap<>();
|
HashMap<String, ReferenceDigestValue> expectedEventLogRecords = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
if (measurement.getDeviceName().equals(hostName)) {
|
if (measurement.getDeviceName().equals(hostName)) {
|
||||||
eventLog = new TCGEventLog(measurement.getRimBytes());
|
actualEventLog = new TCGEventLog(measurement.getRimBytes());
|
||||||
eventValue = referenceDigestValueRepository
|
rimIntegrityMeasurements = referenceDigestValueRepository
|
||||||
.findValuesByBaseRimId(baseReferenceManifest.getId());
|
.findValuesByBaseRimId(baseReferenceManifest.getId());
|
||||||
for (ReferenceDigestValue rdv : eventValue) {
|
for (ReferenceDigestValue rdv : rimIntegrityMeasurements) {
|
||||||
eventValueMap.put(rdv.getDigestValue(), rdv);
|
expectedEventLogRecords.put(rdv.getDigestValue(), rdv);
|
||||||
}
|
}
|
||||||
|
|
||||||
failedPcrValues.addAll(pcrValidator.validateTpmEvents(
|
failedPcrValues.addAll(pcrValidator.validateTpmEvents(
|
||||||
eventLog, eventValueMap, policySettings));
|
actualEventLog, expectedEventLogRecords, policySettings));
|
||||||
}
|
}
|
||||||
} catch (CertificateException cEx) {
|
} catch (CertificateException cEx) {
|
||||||
log.error(cEx);
|
log.error(cEx);
|
||||||
|
Loading…
Reference in New Issue
Block a user