mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-24 07:06:46 +00:00
Merge pull request #688 from nsacyber/v3_issue-684
[#684] Green Check mark fix
This commit is contained in:
commit
566248b244
@ -16,6 +16,8 @@ public interface CACredentialRepository extends JpaRepository<CertificateAuthori
|
|||||||
Page<CertificateAuthorityCredential> findByArchiveFlag(boolean archiveFlag, Pageable pageable);
|
Page<CertificateAuthorityCredential> findByArchiveFlag(boolean archiveFlag, Pageable pageable);
|
||||||
List<CertificateAuthorityCredential> findBySubject(String subject);
|
List<CertificateAuthorityCredential> findBySubject(String subject);
|
||||||
List<CertificateAuthorityCredential> findBySubjectSorted(String subject);
|
List<CertificateAuthorityCredential> findBySubjectSorted(String subject);
|
||||||
|
List<CertificateAuthorityCredential> findBySubjectAndArchiveFlag(String subject, boolean archiveFlag);
|
||||||
|
List<CertificateAuthorityCredential> findBySubjectSortedAndArchiveFlag(String subject, boolean archiveFlag);
|
||||||
CertificateAuthorityCredential findBySubjectKeyIdentifier(byte[] subjectKeyIdentifier);
|
CertificateAuthorityCredential findBySubjectKeyIdentifier(byte[] subjectKeyIdentifier);
|
||||||
CertificateAuthorityCredential findBySubjectKeyIdString(String subjectKeyIdString);
|
CertificateAuthorityCredential findBySubjectKeyIdStringAndArchiveFlag(String subjectKeyIdString, boolean archiveFlag);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ public final class CertificateStringMapBuilder {
|
|||||||
//Check if there is a subject organization
|
//Check if there is a subject organization
|
||||||
if (certificate.getAuthorityKeyIdentifier() != null
|
if (certificate.getAuthorityKeyIdentifier() != null
|
||||||
&& !certificate.getAuthorityKeyIdentifier().isEmpty()) {
|
&& !certificate.getAuthorityKeyIdentifier().isEmpty()) {
|
||||||
skiCA = caCredentialRepository.findBySubjectKeyIdString(certificate.getAuthorityKeyIdentifier());
|
skiCA = caCredentialRepository.findBySubjectKeyIdStringAndArchiveFlag(certificate.getAuthorityKeyIdentifier(), false);
|
||||||
} else {
|
} else {
|
||||||
log.error(String.format("Certificate (%s) for %s has no authority key identifier.",
|
log.error(String.format("Certificate (%s) for %s has no authority key identifier.",
|
||||||
certificate.getClass().toString(), certificate.getSubject()));
|
certificate.getClass().toString(), certificate.getSubject()));
|
||||||
@ -167,10 +167,10 @@ public final class CertificateStringMapBuilder {
|
|||||||
if (certificate.getIssuerSorted() == null
|
if (certificate.getIssuerSorted() == null
|
||||||
|| certificate.getIssuerSorted().isEmpty()) {
|
|| certificate.getIssuerSorted().isEmpty()) {
|
||||||
//Get certificates by subject
|
//Get certificates by subject
|
||||||
issuerCertificates = caCredentialRepository.findBySubject(certificate.getIssuer());
|
issuerCertificates = caCredentialRepository.findBySubjectAndArchiveFlag(certificate.getIssuer(), false);
|
||||||
} else {
|
} else {
|
||||||
//Get certificates by subject organization
|
//Get certificates by subject organization
|
||||||
issuerCertificates = caCredentialRepository.findBySubjectSorted(certificate.getIssuerSorted());
|
issuerCertificates = caCredentialRepository.findBySubjectSortedAndArchiveFlag(certificate.getIssuerSorted(), false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
issuerCertificates.add(skiCA);
|
issuerCertificates.add(skiCA);
|
||||||
|
Loading…
Reference in New Issue
Block a user