From 6dbbee142067db85bbba06d929c3d6a3b6646e26 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Fri, 16 Jun 2023 07:51:30 -0400 Subject: [PATCH] Fixed display issue on PlatformCredentials page and included 'fn' tag reference on details pages. Removed additional files that are not being used. [no ci] --- .../entity/manager/CertificateRepository.java | 7 +- .../entity/manager/SettingsRepository.java | 12 -- .../userdefined/SupplyChainSettings.java | 123 ---------------- .../persist/service/CertificateService.java | 23 --- .../persist/service/DefaultService.java | 4 - .../persist/service/HibernateDbService.java | 132 ------------------ .../service/ReferenceDigestValueService.java | 20 --- .../service/ReferenceManifestService.java | 23 --- .../persist/service/SettingsServiceImpl.java | 41 ------ .../service/SupplyChainValidationService.java | 16 --- .../attestationca/portal/HIRSApplication.java | 7 - .../portal/HIRSDbInitializer.java | 1 - .../OrderedListQueryDataTableAdapter.java | 3 + .../CertificatePageController.java | 5 +- .../utils/CertificateStringMapBuilder.java | 2 +- .../WEB-INF/jsp/certificate-details.jsp | 2 +- .../WEB-INF/jsp/platform-credentials.jsp | 4 +- .../main/webapp/WEB-INF/jsp/rim-details.jsp | 2 +- 18 files changed, 14 insertions(+), 413 deletions(-) delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SettingsRepository.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/SupplyChainSettings.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/CertificateService.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultService.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/HibernateDbService.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceDigestValueService.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceManifestService.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SettingsServiceImpl.java delete mode 100644 HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/CertificateRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/CertificateRepository.java index 58d250d0..85d2db37 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/CertificateRepository.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/CertificateRepository.java @@ -1,6 +1,7 @@ package hirs.attestationca.persist.entity.manager; import hirs.attestationca.persist.entity.userdefined.Certificate; +import hirs.attestationca.persist.entity.userdefined.certificate.EndorsementCredential; import hirs.attestationca.persist.entity.userdefined.certificate.PlatformCredential; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -28,9 +29,9 @@ public interface CertificateRepository extends JpaReposit @Query(value = "SELECT * FROM Certificate where platformSerial = ?1 AND DTYPE = 'PlatformCredential'", nativeQuery = true) List byBoardSerialNumber(String boardSerialNumber); @Query(value = "SELECT * FROM Certificate where holderSerialNumber = ?1 AND DTYPE = 'PlatformCredential'", nativeQuery = true) - PlatformCredential byHolderSerialNumber(BigInteger holderSerialNumber); - @Query(value = "SELECT * FROM Certificate where holderSerialNumber = ?1 AND DTYPE = dType", nativeQuery = true) - T byHolderSerialNumber(BigInteger holderSerialNumber, String dType); + PlatformCredential getPcByHolderSerialNumber(BigInteger holderSerialNumber); + @Query(value = "SELECT * FROM Certificate where holderSerialNumber = ?1 AND DTYPE = 'EndorsementCredential'", nativeQuery = true) + EndorsementCredential getEcByHolderSerialNumber(BigInteger holderSerialNumber); @Query(value = "SELECT * FROM Certificate where certificateHash = ?1 AND DTYPE = ?2", nativeQuery = true) T findByCertificateHash(int certificateHash, String dType); @Query(value = "SELECT * FROM Certificate where subjectKeyIdentifier = ?1", nativeQuery = true) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SettingsRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SettingsRepository.java deleted file mode 100644 index be84710e..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SettingsRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package hirs.attestationca.persist.entity.manager; - -import hirs.attestationca.persist.entity.userdefined.SupplyChainSettings; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -import java.util.UUID; - -@Repository -public interface SettingsRepository extends JpaRepository { - SupplyChainSettings findByName(String name); -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/SupplyChainSettings.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/SupplyChainSettings.java deleted file mode 100644 index 59423534..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/SupplyChainSettings.java +++ /dev/null @@ -1,123 +0,0 @@ -package hirs.attestationca.persist.entity.userdefined; - -import hirs.attestationca.persist.entity.UserDefinedEntity; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Table; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -/** - * Class represents Supply Chain policy. Supply Chain Policy identifies the methods in - * SupplyChainValidator that should be used in order to validate a supply chain. - * By default, the policy does not enable any validations. - */ -@Table(name = "SupplyChainSettings") -@Getter -@Setter -@Entity -@ToString(callSuper = true) -public class SupplyChainSettings extends UserDefinedEntity { - /** - * Name of the default Supply Chain Policy. - */ - public static final String DEFAULT_POLICY = "Default Supply Chain Policy"; - /** - * Number of days in 10 years. - */ - public static final String TEN_YEARS = "3651"; - /** - * Number of days in 1 year. - */ - public static final String YEAR = "365"; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean ecValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean pcValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean pcAttributeValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean firmwareValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean utcValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean expiredCertificateValidationEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean replaceEC = false; - - @Column(nullable = false, columnDefinition = "boolean default true") - private boolean issueAttestationCertificate = true; - - @Column(nullable = false, columnDefinition = "boolean default true") - private boolean issueDevIdCertificate = true; - - @Column(nullable = false) - private String validityDays = TEN_YEARS; - - @Column(nullable = false) - private String devIdValidityDays = TEN_YEARS; - - @Column(nullable = false) - private String reissueThreshold = YEAR; - - @Column(nullable = false) - private String devIdReissueThreshold = YEAR; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean generateOnExpiration = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean devIdExpirationFlag = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean ignoreImaEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean ignoretBootEnabled = false; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean linuxOs = false; - - @Column(nullable = false, columnDefinition = "boolean default true") - private boolean ignoreGptEnabled = true; - - @Column(nullable = false, columnDefinition = "boolean default false") - private boolean ignoreOsEvtEnabled = false; - - /** - * Default constructor necessary for Hibernate. - */ - protected SupplyChainSettings() { - super(); - } - - /** - * Constructor used to initialize SupplyChainSettings object. - * - * @param name - * A name used to uniquely identify and reference the Supply Chain policy. - */ - public SupplyChainSettings(final String name) { - super(name); - } - - /** - * Constructor used to initialize SupplyChainSettings object. - * - * @param name - * A name used to uniquely identify and reference the supply chain policy. - * @param description - * Optional description of the policy that can be added by the user - */ - public SupplyChainSettings(final String name, final String description) { - super(name, description); - } -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/CertificateService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/CertificateService.java deleted file mode 100644 index 7cd7f4b6..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/CertificateService.java +++ /dev/null @@ -1,23 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.entity.userdefined.Certificate; -import hirs.attestationca.persist.service.selector.CertificateSelector; - -import java.util.List; -import java.util.Set; -import java.util.UUID; - -public interface CertificateService { - - Certificate saveCertificate(Certificate certificate); - - List fetchCertificates(Class classType); - - Certificate updateCertificate(Certificate certificate, UUID certificateId); - - Certificate updateCertificate(Certificate certificate); - - void deleteCertificate(Certificate certificate); - - Set get(CertificateSelector certificateSelector); -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultService.java deleted file mode 100644 index 5da9fb2c..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultService.java +++ /dev/null @@ -1,4 +0,0 @@ -package hirs.attestationca.persist.service; - -public interface DefaultService { -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/HibernateDbService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/HibernateDbService.java deleted file mode 100644 index e949f46d..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/HibernateDbService.java +++ /dev/null @@ -1,132 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.DBManagerException; -import jakarta.persistence.EntityManager; -import jakarta.persistence.PersistenceContext; -import jakarta.persistence.criteria.CriteriaBuilder; -import jakarta.persistence.criteria.CriteriaQuery; -import lombok.extern.log4j.Log4j2; - -import java.util.ArrayList; -import java.util.List; - -/** - * Abstract class that has the underlying Hibernate commands used by other DB Managers. - * This class exists primarily to reduce code in {@link hirs.attestationca.persist.service.DefaultDbService} which retries these methods - * using a RetryTemplate. - * - * @param type of objects to manage by this manager - */ -@Log4j2 -public abstract class HibernateDbService { - - private static final int MAX_CLASS_CACHE_ENTRIES = 500; - - private final Class clazz; - @PersistenceContext - private EntityManager entityManager; - private CriteriaBuilder criteriaBuilder; - private CriteriaQuery criteriaQuery; - - /** - * Creates a new AbstractDbManager. - * - * @param clazz Class to search for when doing Hibernate queries, - * unfortunately class type of T cannot be determined using only T - * @param entityManager the session factory to use to interact with the database - */ - public HibernateDbService(final Class clazz, final EntityManager entityManager) { - if (clazz == null) { - log.error("HibernateDbService cannot be instantiated with a null class"); - throw new IllegalArgumentException( - "HibernateDbService cannot be instantiated with a null class" - ); - } -// if (entityManager == null) { -// log.error("HibernateDbService cannot be instantiated with a null SessionFactory"); -// throw new IllegalArgumentException( -// "HibernateDbService cannot be instantiated with a null SessionFactory" -// ); -// } - this.clazz = clazz; - this.entityManager = entityManager; - } - - public HibernateDbService() { - clazz = null; - } - - /** - * Returns a list of all Ts of type clazz in the database, with an - * additional restriction also specified in the query. - *

- * This would be useful if T has several subclasses being - * managed. This class argument allows the caller to limit which types of - * T should be returned. - * - * @param clazz class type of Ts to search for (may be null to - * use Class<T>) - * @param additionalRestriction - an added Criterion to use in the query, null for none - * @return list of T names - * @throws DBManagerException if unable to search the database - */ - protected List doGetList(final Class clazz) - throws DBManagerException { - log.debug("Getting object list"); - Class searchClass = clazz; - if (clazz == null) { - log.debug("clazz is null"); - searchClass = this.clazz; - } - - List objects = new ArrayList<>(); - - return objects; - } - - /** - * Deletes the object from the database. This removes all of the database - * entries that stored information with regards to the this object. - *

- * If the object is referenced by any other tables then this will throw a - * DBManagerException. - * - * @param name name of the object to delete - * @return true if successfully found and deleted the object - * @throws DBManagerException if unable to find the baseline or delete it - * from the database - */ -// protected boolean doDelete(final String name) throws DBManagerException { -// log.debug("deleting object: {}", name); -// if (name == null) { -// log.debug("null name argument"); -// return false; -// } -// -// boolean deleted = false; -// Session session = entityManager.unwrap(Session.class); -// try { -// log.debug("retrieving object from db"); -// criteriaBuilder = session.getCriteriaBuilder(); -// criteriaQuery = criteriaBuilder.createQuery(clazz); -// Root root = criteriaQuery.from(clazz); -// criteriaQuery.select(root).where(criteriaBuilder.equal(root.get("name"), name)); -// -// Object object = session.createQuery(criteriaQuery).getSingleResult(); -// -// if (clazz.isInstance(object)) { -// T objectOfTypeT = clazz.cast(object); -// log.debug("found object, deleting it"); -// session.delete(objectOfTypeT); -// deleted = true; -// } -// } catch (Exception e) { -// final String msg = "unable to retrieve object"; -// log.error(msg, e); -// throw new DBManagerException(msg, e); -// } -// return deleted; -// } - - -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceDigestValueService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceDigestValueService.java deleted file mode 100644 index cef27536..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceDigestValueService.java +++ /dev/null @@ -1,20 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.entity.userdefined.ReferenceManifest; -import hirs.attestationca.persist.entity.userdefined.rim.ReferenceDigestValue; - -import java.util.List; -import java.util.UUID; - -public interface ReferenceDigestValueService { - - ReferenceDigestValue saveReferenceDigestValue(ReferenceDigestValue referenceDigestValue); - - List fetchDigestValues(); - - ReferenceDigestValue updateRefDigestValue(ReferenceDigestValue referenceDigestValue, UUID rdvId); - - List getValuesByRimId(ReferenceManifest baseRim); - - void deleteRefDigestValueById(UUID rdvId); -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceManifestService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceManifestService.java deleted file mode 100644 index 49b2e7e6..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/ReferenceManifestService.java +++ /dev/null @@ -1,23 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.OrderedListQuerier; -import hirs.attestationca.persist.entity.userdefined.ReferenceManifest; -import hirs.attestationca.persist.service.selector.ReferenceManifestSelector; - -import java.util.List; -import java.util.Set; -import java.util.UUID; - -public interface ReferenceManifestService extends OrderedListQuerier { - - ReferenceManifest saveReferenceManifest(ReferenceManifest referenceManifest); - - List fetchReferenceManifests(); -// DataTablesOutput fetchReferenceManifests(DataTablesInput input); - - ReferenceManifest updateReferenceManifest(ReferenceManifest referenceManifest, UUID rimId); - - void deleteReferenceManifestById(UUID rimId); - - Set get(ReferenceManifestSelector referenceManifestSelector); -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SettingsServiceImpl.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SettingsServiceImpl.java deleted file mode 100644 index e3e9e553..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SettingsServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.entity.manager.SettingsRepository; -import hirs.attestationca.persist.entity.userdefined.SupplyChainSettings; -import jakarta.persistence.EntityManager; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class SettingsServiceImpl { - - @Autowired(required = false) - private EntityManager entityManager; - - @Autowired - private SettingsRepository repository; - - public SupplyChainSettings updateSettings(SupplyChainSettings settings) { - SupplyChainSettings existing = repository.findByName(settings.getName()); - - if (existing != null) { - settings.setId(existing.getId()); - } - return repository.save(settings); - } - - public void saveSettings(SupplyChainSettings settings) { - repository.save(settings); - } - - public SupplyChainSettings getByName(String name) { - if (name == null) { - return null; - } - return repository.findByName(name); - } - -// public Policy getDefaultPolicy(Appraiser appraiser) { -// return repository.findByAppraiser(appraiser); -// } -} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java deleted file mode 100644 index b8ce4c56..00000000 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java +++ /dev/null @@ -1,16 +0,0 @@ -package hirs.attestationca.persist.service; - -import hirs.attestationca.persist.entity.userdefined.SupplyChainValidation; - -import java.util.List; -import java.util.UUID; - -public interface SupplyChainValidationService { - SupplyChainValidation saveSupplyChainValidation(SupplyChainValidation supplyChainValidation); - - List fetchSupplyChainValidations(); - - SupplyChainValidation updateSupplyChainValidation(SupplyChainValidation supplyChainValidation, UUID scvId); - - void deleteSupplyChainValidation(UUID scvId); -} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java index 855aea4d..ae04c9e9 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSApplication.java @@ -36,12 +36,5 @@ public class HIRSApplication extends SpringBootServletInitializer { SpringApplication springApplication = new SpringApplication(HIRSApplication.class); springApplication.setDefaultProperties(Collections.singletonMap("server.servlet.context-path", "/portal")); springApplication.run(args); - -// log.debug("Debug log message"); - log.info("Info log message"); - log.error("Error log message"); - log.warn("Warn log message"); - log.fatal("Fatal log message"); -// log.trace("Trace log message"); } } \ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSDbInitializer.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSDbInitializer.java index d05c1926..c42b7dfa 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSDbInitializer.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/HIRSDbInitializer.java @@ -28,7 +28,6 @@ public class HIRSDbInitializer extends AbstractAnnotationConfigDispatcherServlet log.debug("Unable to locate MultipartResolver with name 'multipartResolver': no multipart request handling provided"); } } catch (Exception ex) { - log.error("DAVY********************************************************************************"); log.error(ex.getMessage()); } } diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java index 2e8e7f6b..d5393100 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/OrderedListQueryDataTableAdapter.java @@ -2,6 +2,7 @@ package hirs.attestationca.portal.datatables; import hirs.attestationca.persist.CriteriaModifier; import hirs.attestationca.persist.FilteredRecordsList; +import lombok.extern.log4j.Log4j2; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.util.CollectionUtils; @@ -15,6 +16,7 @@ import java.util.UUID; * of ordered lists. * @param The type of object to query */ +@Log4j2 public final class OrderedListQueryDataTableAdapter { private OrderedListQueryDataTableAdapter() { @@ -67,6 +69,7 @@ public final class OrderedListQueryDataTableAdapter { //Object that will store query values FilteredRecordsList filteredRecordsList = new FilteredRecordsList<>(); + filteredRecordsList.setRecordsTotal(dbManager.count()); filteredRecordsList.addAll(dbManager.findAll()); filteredRecordsList.setRecordsFiltered(10); diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java index cc5f3045..0fa32cba 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java @@ -212,9 +212,8 @@ public class CertificatePageController extends PageController { for (int i = 0; i < records.size(); i++) { PlatformCredential pc = (PlatformCredential) records.get(i); // find the EC using the PC's "holder serial number" - associatedEC = (EndorsementCredential) certificateRepository - .byHolderSerialNumber(pc.getHolderSerialNumber(), - "EndorsementCredential"); + associatedEC = certificateRepository + .getEcByHolderSerialNumber(pc.getHolderSerialNumber()); if (associatedEC != null) { log.debug("EC ID for holder s/n " + pc diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java index 53357f0c..bbc7137b 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java @@ -340,7 +340,7 @@ public final class CertificateStringMapBuilder { } PlatformCredential prevCertificate = certificateRepository - .byHolderSerialNumber(certificate.getSerialNumber()); + .getPcByHolderSerialNumber(certificate.getSerialNumber()); if (prevCertificate != null) { data.put("prevCertId", prevCertificate.getId().toString()); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/certificate-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/certificate-details.jsp index 27d728f0..60b2138e 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/certificate-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/certificate-details.jsp @@ -3,7 +3,7 @@ <%@taglib prefix="c" uri="jakarta.tags.core" %> <%@taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%> - +<%@taglib prefix="fn" uri="jakarta.tags.functions"%> <%@taglib prefix="my" tagdir="/WEB-INF/tags"%> <%--CONTENT--%> diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/platform-credentials.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/platform-credentials.jsp index 88dbdffc..59e11c61 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/platform-credentials.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/platform-credentials.jsp @@ -70,8 +70,8 @@ { data: 'credentialType', render: function (data, type, full, meta) { - if (full.platformType !== '') { - return full.platformType; + if (full.platformChainType !== '') { + return full.platformChainType; } else { return full.credentialType; } diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index f55dc3d7..cb4e09bd 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -4,7 +4,7 @@ <%@taglib prefix="c" uri="jakarta.tags.core" %> <%@taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%> - +<%@taglib prefix="fn" uri="jakarta.tags.functions"%> <%@taglib prefix="my" tagdir="/WEB-INF/tags"%> <%--CONTENT--%>