mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-31 00:24:00 +00:00
Revert "Decode the event content for display on the frontend."
This reverts commit 2671a572bacc8de4a23fbc108832583453a2d9d8.
This commit is contained in:
parent
1cbe50b401
commit
96200f57c2
@ -19,8 +19,6 @@ import hirs.persist.DBReferenceManifestManager;
|
|||||||
import hirs.persist.ReferenceDigestManager;
|
import hirs.persist.ReferenceDigestManager;
|
||||||
import hirs.persist.ReferenceEventManager;
|
import hirs.persist.ReferenceEventManager;
|
||||||
import hirs.persist.ReferenceManifestManager;
|
import hirs.persist.ReferenceManifestManager;
|
||||||
import hirs.tpm.eventlog.TCGEventLog;
|
|
||||||
import hirs.tpm.eventlog.TpmPcrEvent;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.hibernate.Criteria;
|
import org.hibernate.Criteria;
|
||||||
@ -34,13 +32,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for the TPM Events page.
|
* Controller for the TPM Events page.
|
||||||
@ -181,23 +175,6 @@ public class RimDatabasePageController
|
|||||||
LOGGER.error("Failed to update TPM Event with Base RIM ID");
|
LOGGER.error("Failed to update TPM Event with Base RIM ID");
|
||||||
LOGGER.error(rdv);
|
LOGGER.error(rdv);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Find the matching TpmPcrEvent and decode the event content
|
|
||||||
try {
|
|
||||||
TCGEventLog logProcessor = new TCGEventLog(support.getRimBytes());
|
|
||||||
for (TpmPcrEvent tpe : logProcessor.getEventList()) {
|
|
||||||
if (Arrays.equals(rdv.getContentBlob(), tpe.getEventContent())) {
|
|
||||||
rdv.setContentString(tpe.getEventContentStr());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
LOGGER.info("Unknown algorithm encountered.");
|
|
||||||
} catch (CertificateException e) {
|
|
||||||
LOGGER.info("Log certificate could not be parsed.");
|
|
||||||
} catch (IOException e) {
|
|
||||||
LOGGER.info("Event could not be parsed.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
<jsp:attribute name="pageHeaderTitle">RIM Database</jsp:attribute>
|
<jsp:attribute name="pageHeaderTitle">RIM Database</jsp:attribute>
|
||||||
|
|
||||||
<jsp:body>
|
<jsp:body>
|
||||||
<my:details-viewer id="content-blob-viewer" label="Event Content">
|
|
||||||
</my:details-viewer>
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="aca-data-table">
|
<div class="aca-data-table">
|
||||||
<table id="digestValueTable" class="display" width="100%">
|
<table id="digestValueTable" class="display" width="100%">
|
||||||
@ -27,9 +25,7 @@
|
|||||||
<th>Event Type</th>
|
<th>Event Type</th>
|
||||||
<th>PCR Index</th>
|
<th>PCR Index</th>
|
||||||
<th>Digest Value</th>
|
<th>Digest Value</th>
|
||||||
<th>Details</th>
|
|
||||||
<th>Base RIM</th>
|
<th>Base RIM</th>
|
||||||
<th>Support RIM</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@ -41,35 +37,25 @@
|
|||||||
var columns = [
|
var columns = [
|
||||||
{data: 'manufacturer',
|
{data: 'manufacturer',
|
||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: false},
|
searchable:false},
|
||||||
{data: 'model',
|
{data: 'model',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false},
|
searchable:false},
|
||||||
{data: 'eventType',
|
{data: 'eventType',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false,},
|
searchable:false,},
|
||||||
{data: 'pcrIndex',
|
{data: 'pcrIndex',
|
||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: false},
|
searchable:false},
|
||||||
{data: 'digestValue',
|
{data: 'digestValue',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false},
|
searchable:false},
|
||||||
{data: 'contentString',
|
|
||||||
orderable: false,
|
|
||||||
searchable: false},
|
|
||||||
{data: 'baseRimId',
|
{data: 'baseRimId',
|
||||||
orderable: false,
|
orderable: false,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
render: function(data, type, full, meta) {
|
render: function(data, type, full, meta) {
|
||||||
return rimDetailsLink(full.baseRimId);
|
return rimDetailsLink(full.baseRimId);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{data: 'supportRimId',
|
|
||||||
orderable: false,
|
|
||||||
searchable: false,
|
|
||||||
render: function(data, type, full, meta) {
|
|
||||||
return rimDetailsLink(full.supportRimId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import javax.persistence.AccessType;
|
|||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Transient;
|
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
@ -48,8 +47,6 @@ public class ReferenceDigestValue extends ArchivableEntity {
|
|||||||
private boolean matchFail;
|
private boolean matchFail;
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private boolean patched = false;
|
private boolean patched = false;
|
||||||
@Transient
|
|
||||||
private String contentString; //used for displaying content blob on frontend
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor necessary for Hibernate.
|
* Default constructor necessary for Hibernate.
|
||||||
@ -96,7 +93,6 @@ public class ReferenceDigestValue extends ArchivableEntity {
|
|||||||
this.matchFail = matchFail;
|
this.matchFail = matchFail;
|
||||||
this.patched = patched;
|
this.patched = patched;
|
||||||
this.contentBlob = Arrays.clone(contentBlob);
|
this.contentBlob = Arrays.clone(contentBlob);
|
||||||
this.contentString = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -261,22 +257,6 @@ public class ReferenceDigestValue extends ArchivableEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Getter for the String representation of the contentBlob property.
|
|
||||||
* @return the content string
|
|
||||||
*/
|
|
||||||
public String getContentString() {
|
|
||||||
return contentString;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setter for the String representation of the contentBlob property.
|
|
||||||
* @param contentString the string value
|
|
||||||
*/
|
|
||||||
public void setContentString(final String contentString) {
|
|
||||||
this.contentString = contentString;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object obj) {
|
public boolean equals(final Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user