From 0422ad96b320f72066a4595ccf7f2db6f3602707 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:21:32 -0500 Subject: [PATCH] The query to search for a subject that matches the issuer was incorrect, instead it was looking for the issuer, using the issuer. This fixes that problem and now the CA certificates link properly and draw a green check mark --- .../persist/entity/manager/CertificateRepository.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 90f94c1ed..900a30a64 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 @@ -17,10 +17,10 @@ public interface CertificateRepository extends JpaRepository @Query(value = "SELECT * FROM Certificate where id = ?1", nativeQuery = true) Certificate getCertificate(UUID uuid); - @Query(value = "SELECT * FROM Certificate where issuer = ?1 AND DTYPE = ?2", nativeQuery = true) - List findBySubject(String issuer, String dType); - @Query(value = "SELECT * FROM Certificate where issuerSorted = ?1 AND DTYPE = ?2", nativeQuery = true) - List findBySubjectSorted(String issuedSort, String dType); + @Query(value = "SELECT * FROM Certificate where subject = ?1 AND DTYPE = ?2", nativeQuery = true) + List findBySubject(String subject, String dType); + @Query(value = "SELECT * FROM Certificate where subjectSorted = ?1 AND DTYPE = ?2", nativeQuery = true) + List findBySubjectSorted(String subjectSorted, String dType); @Query(value = "SELECT * FROM Certificate where DTYPE = ?1", nativeQuery = true) List findByType(String dType); @Query(value = "SELECT * FROM Certificate where serialNumber = ?1 AND DTYPE = ?2", nativeQuery = true)