diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/AbstractAttestationCertificateAuthority.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/AbstractAttestationCertificateAuthority.java index a3a7627f..59fbb719 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/AbstractAttestationCertificateAuthority.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/AbstractAttestationCertificateAuthority.java @@ -777,6 +777,8 @@ public abstract class AbstractAttestationCertificateAuthority this.referenceManifestManager.save(dbBaseRim); } else { LOG.info("Client provided Base RIM already loaded in database."); + dbBaseRim.restore(); + dbBaseRim.resetCreateTime(); } tagId = dbBaseRim.getTagId(); @@ -802,7 +804,7 @@ public abstract class AbstractAttestationCertificateAuthority support.setTagId(tagId); this.referenceManifestManager.save(support); } else { - LOG.error("Client provided Support RIM already loaded in database."); + LOG.info("Client provided Support RIM already loaded in database."); if (dbBaseRim != null) { support.setPlatformManufacturer(dbBaseRim.getPlatformManufacturer()); support.setPlatformModel(dbBaseRim.getPlatformModel()); @@ -811,6 +813,8 @@ public abstract class AbstractAttestationCertificateAuthority support.setTagId(dbBaseRim.getTagId()); } + support.restore(); + support.resetCreateTime(); this.referenceManifestManager.update(support); } } catch (IOException ioEx) { diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java index ded07cee..65298a58 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java @@ -102,6 +102,7 @@ public class ReferenceManifestDetailsPageController LOGGER.error(uuidError, iaEx); } catch (Exception ioEx) { LOGGER.error(ioEx); + LOGGER.trace(ioEx); } if (data.isEmpty()) { String notFoundMessage = "Unable to find RIM with ID: " + params.getId(); @@ -236,6 +237,10 @@ public class ReferenceManifestDetailsPageController baseRim.setAssociatedRim(support.getId()); logProcessor = new TCGEventLog(support.getRimBytes()); } + } else { + support = SupportReferenceManifest.select(referenceManifestManager) + .byEntityId(baseRim.getAssociatedRim()).getRIM(); + logProcessor = new TCGEventLog(support.getRimBytes()); } // going to have to pull the filename and grab that from the DB // to get the id to make the link diff --git a/HIRS_ProvisionerTPM2/src/TPM2_Provisioner.cpp b/HIRS_ProvisionerTPM2/src/TPM2_Provisioner.cpp index 705bf01d..957759e7 100644 --- a/HIRS_ProvisionerTPM2/src/TPM2_Provisioner.cpp +++ b/HIRS_ProvisionerTPM2/src/TPM2_Provisioner.cpp @@ -87,7 +87,15 @@ int provision() { const std::string& swid_file = props.get("tcg.swidtag.file", ""); try { dv.set_logfile(hirs::file_utils::fileToString(rim_file)); + } catch (HirsRuntimeException& hirsRuntimeException) { + logger.error(hirsRuntimeException.what()); + } + try { dv.set_swidfile(hirs::file_utils::fileToString(swid_file)); + } catch (HirsRuntimeException& hirsRuntimeException) { + logger.error(hirsRuntimeException.what()); + } + try { dv.set_livelog(hirs::file_utils::fileToString( "/sys/kernel/security/tpm0/binary_bios_measurements")); } catch (HirsRuntimeException& hirsRuntimeException) {