mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-21 05:53:27 +00:00
Revert "Decode the event content for display on the frontend."
This reverts commit 2671a572ba
.
This commit is contained in:
parent
2671a572ba
commit
1d57ab0d09
@ -19,8 +19,6 @@ import hirs.persist.DBReferenceManifestManager;
|
||||
import hirs.persist.ReferenceDigestManager;
|
||||
import hirs.persist.ReferenceEventManager;
|
||||
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.Logger;
|
||||
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.servlet.ModelAndView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Controller for the TPM Events page.
|
||||
@ -183,23 +177,6 @@ public class RimDatabasePageController
|
||||
LOGGER.error("Failed to update TPM Event with Base RIM ID");
|
||||
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:body>
|
||||
<my:details-viewer id="content-blob-viewer" label="Event Content">
|
||||
</my:details-viewer>
|
||||
<br/>
|
||||
<div class="aca-data-table">
|
||||
<table id="digestValueTable" class="display" width="100%">
|
||||
@ -27,9 +25,7 @@
|
||||
<th>Event Type</th>
|
||||
<th>PCR Index</th>
|
||||
<th>Digest Value</th>
|
||||
<th>Details</th>
|
||||
<th>Base RIM</th>
|
||||
<th>Support RIM</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@ -41,35 +37,25 @@
|
||||
var columns = [
|
||||
{data: 'manufacturer',
|
||||
orderable: true,
|
||||
searchable: false},
|
||||
searchable:false},
|
||||
{data: 'model',
|
||||
orderable: false,
|
||||
searchable: false},
|
||||
searchable:false},
|
||||
{data: 'eventType',
|
||||
orderable: false,
|
||||
searchable: false,},
|
||||
searchable:false,},
|
||||
{data: 'pcrIndex',
|
||||
orderable: true,
|
||||
searchable: false},
|
||||
searchable:false},
|
||||
{data: 'digestValue',
|
||||
orderable: false,
|
||||
searchable: false},
|
||||
{data: 'contentString',
|
||||
orderable: false,
|
||||
searchable: false},
|
||||
searchable:false},
|
||||
{data: 'baseRimId',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
render: function(data, type, full, meta) {
|
||||
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.Entity;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
@ -48,8 +47,6 @@ public class ReferenceDigestValue extends ArchivableEntity {
|
||||
private boolean matchFail;
|
||||
@Column(nullable = false)
|
||||
private boolean patched = false;
|
||||
@Transient
|
||||
private String contentString; //used for displaying content blob on frontend
|
||||
|
||||
/**
|
||||
* Default constructor necessary for Hibernate.
|
||||
@ -96,7 +93,6 @@ public class ReferenceDigestValue extends ArchivableEntity {
|
||||
this.matchFail = matchFail;
|
||||
this.patched = patched;
|
||||
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
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user