mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-31 08:25:39 +00:00
the DN compare of bouncy castle utils throws and exception if the object
is null. Added additional condition to the if statement to check null status.
This commit is contained in:
parent
e133b5040b
commit
57632e0923
@ -117,7 +117,8 @@ public class SupplyChainValidationServiceImpl extends DefaultDbService<SupplyCha
|
|||||||
HashSet<CertificateAuthorityCredential> caCreds = new HashSet<>();
|
HashSet<CertificateAuthorityCredential> caCreds = new HashSet<>();
|
||||||
for (CertificateAuthorityCredential cred : certAuthsWithMatchingIssuer) {
|
for (CertificateAuthorityCredential cred : certAuthsWithMatchingIssuer) {
|
||||||
caCreds.add(cred);
|
caCreds.add(cred);
|
||||||
if (!BouncyCastleUtils.x500NameCompare(cred.getHolderIssuer(),
|
if ((cred.getHolderIssuer() != null && cred.getSubject() != null)
|
||||||
|
&& !BouncyCastleUtils.x500NameCompare(cred.getHolderIssuer(),
|
||||||
cred.getSubject())) {
|
cred.getSubject())) {
|
||||||
caCreds.addAll(getCaChainRec(cred, queriedOrganizations));
|
caCreds.addAll(getCaChainRec(cred, queriedOrganizations));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user