This is a refactore that changes BiosMeasurements into EventLogMeasurements for evolving naming convention updates.

This commit is contained in:
Cyrus 2020-10-26 11:09:26 -04:00
parent 3df6eff549
commit 24e460e0c4
3 changed files with 13 additions and 13 deletions

View File

@ -9,7 +9,7 @@ import hirs.attestationca.exceptions.UnexpectedServerException;
import hirs.attestationca.service.SupplyChainValidationService;
import hirs.data.persist.AppraisalStatus;
import hirs.data.persist.BaseReferenceManifest;
import hirs.data.persist.BiosMeasurements;
import hirs.data.persist.EventLogMeasurements;
import hirs.data.persist.Device;
import hirs.data.persist.DeviceInfoReport;
import hirs.data.persist.ReferenceManifest;
@ -810,13 +810,13 @@ public abstract class AbstractAttestationCertificateAuthority
clientName);
try {
// find previous version. If it exists, delete it
support = BiosMeasurements.select(referenceManifestManager)
support = EventLogMeasurements.select(referenceManifestManager)
.byManufacturer(dv.getHw().getManufacturer())
.includeArchived().getRIM();
if (support != null) {
this.referenceManifestManager.delete(support);
}
support = new BiosMeasurements(fileName,
support = new EventLogMeasurements(fileName,
dv.getLivelog().toByteArray());
support.setPlatformManufacturer(dv.getHw().getManufacturer());
support.setPlatformModel(dv.getHw().getProductName());

View File

@ -7,7 +7,7 @@ import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import hirs.data.persist.BaseReferenceManifest;
import hirs.data.persist.BiosMeasurements;
import hirs.data.persist.EventLogMeasurements;
import hirs.data.persist.SupportReferenceManifest;
import hirs.data.persist.TPMMeasurementRecord;
import hirs.data.persist.PCRPolicy;
@ -340,7 +340,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe
.byManufacturer(manufacturer).getRIM();
supportReferenceManifest = SupportReferenceManifest.select(referenceManifestManager)
.byManufacturer(manufacturer).getRIM();
measurement = BiosMeasurements.select(referenceManifestManager)
measurement = EventLogMeasurements.select(referenceManifestManager)
.byManufacturer(manufacturer).includeArchived().getRIM();
String failedString = "";

View File

@ -23,8 +23,8 @@ import java.util.Collection;
* however this is the live log from the client.
*/
@Entity
public class BiosMeasurements extends ReferenceManifest {
private static final Logger LOGGER = LogManager.getLogger(BiosMeasurements.class);
public class EventLogMeasurements extends ReferenceManifest {
private static final Logger LOGGER = LogManager.getLogger(EventLogMeasurements.class);
@Column
@JsonIgnore
@ -33,7 +33,7 @@ public class BiosMeasurements extends ReferenceManifest {
/**
* This class enables the retrieval of SupportReferenceManifest by their attributes.
*/
public static class Selector extends ReferenceManifestSelector<BiosMeasurements> {
public static class Selector extends ReferenceManifestSelector<EventLogMeasurements> {
/**
* Construct a new ReferenceManifestSelector that
* will use the given (@link ReferenceManifestManager}
@ -43,7 +43,7 @@ public class BiosMeasurements extends ReferenceManifest {
* reference manifests.
*/
public Selector(final ReferenceManifestManager referenceManifestManager) {
super(referenceManifestManager, BiosMeasurements.class, false);
super(referenceManifestManager, EventLogMeasurements.class, false);
}
/**
@ -86,7 +86,7 @@ public class BiosMeasurements extends ReferenceManifest {
* @param rimBytes byte array representation of the RIM
* @throws java.io.IOException if unable to unmarshal the string
*/
public BiosMeasurements(final byte[] rimBytes) throws IOException {
public EventLogMeasurements(final byte[] rimBytes) throws IOException {
this("blank.measurement", rimBytes);
}
/**
@ -96,8 +96,8 @@ public class BiosMeasurements extends ReferenceManifest {
* @param rimBytes byte array representation of the RIM
* @throws java.io.IOException if unable to unmarshal the string
*/
public BiosMeasurements(final String fileName,
final byte[] rimBytes
public EventLogMeasurements(final String fileName,
final byte[] rimBytes
) throws IOException {
super(rimBytes);
this.setFileName(fileName);
@ -109,7 +109,7 @@ public class BiosMeasurements extends ReferenceManifest {
/**
* Default constructor necessary for Hibernate.
*/
protected BiosMeasurements() {
protected EventLogMeasurements() {
super();
this.pcrHash = 0;
}