mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-18 10:46:39 +00:00
Updated the policy code to modify the measurement array length and ignore PCR 10 as well.
This commit is contained in:
parent
cf4e641273
commit
483099a273
@ -171,20 +171,26 @@ public final class PCRPolicy extends Policy {
|
||||
short localityAtRelease = 0;
|
||||
String quoteString = new String(tpmQuote, StandardCharsets.UTF_8);
|
||||
int pcrMaskSelection = PcrSelection.ALL_PCRS_ON;
|
||||
int recordLength = baselinePcrs.length;
|
||||
|
||||
TPMMeasurementRecord[] measurements = new TPMMeasurementRecord[baselinePcrs.length];
|
||||
if (enableIgnoreIma) {
|
||||
pcrMaskSelection = IMA_MASK;
|
||||
recordLength--;
|
||||
}
|
||||
|
||||
TPMMeasurementRecord[] measurements = new TPMMeasurementRecord[recordLength];
|
||||
try {
|
||||
for (int i = 0; i <= TPMMeasurementRecord.MAX_PCR_ID; i++) {
|
||||
if (i == 10 && enableIgnoreIma) {
|
||||
LOGGER.info("Ignore IMA PCR policy is enabled.");
|
||||
} else {
|
||||
measurements[i] = new TPMMeasurementRecord(i, storedPcrs[i]);
|
||||
}
|
||||
}
|
||||
} catch (DecoderException deEx) {
|
||||
LOGGER.error(deEx);
|
||||
}
|
||||
|
||||
if (this.enableIgnoreIma) {
|
||||
pcrMaskSelection = IMA_MASK;
|
||||
}
|
||||
|
||||
PcrSelection pcrSelection = new PcrSelection(pcrMaskSelection);
|
||||
PcrComposite pcrComposite = new PcrComposite(
|
||||
pcrSelection,
|
||||
|
Loading…
Reference in New Issue
Block a user