thrownewCertificateException("The provided input should not contain multiple root CA certificates. Issuer of first detected Root CA certificate: "+issuer+" Issuer of second detected Root CA certificate: : "+sameIssuer);
}
}
else
{
// regular issuer
if(byIssuer.put(issuer,certificate)!=null)
{
thrownewCertificateException("The provided input should not contain multiple certificates with identical issuerDN values. Offending value: "+issuer);
}
}
}
// By subject
if(bySubject.put(subject,certificate)!=null){
if(bySubject.put(subject,certificate)!=null){
thrownewCertificateException("The provided input should not contain multiple certificates with identical subjectDN values. Offending value: "+subject);
thrownewCertificateException("The provided input should not contain multiple certificates with identical subjectDN values. Offending value: "+subject);
}
}
...
@@ -178,16 +195,16 @@ public class CertificateUtils
...
@@ -178,16 +195,16 @@ public class CertificateUtils
}
}
if(first==null){
if(first==null){
thrownewCertificateException("The provided input should contain a certificates that has a subjectDN value that's not equal to the issuerDN value of any other certificate.");
thrownewCertificateException("The provided input should contain a certificate that has a subjectDN value that's not equal to the issuerDN value of any other certificate.");
}
}
orderedResult.add(first);
orderedResult.add(first);
// With the first certificate in hand, every following certificate should have a subject that's equal to the previous issuer value.
// With the first certificate in hand, every following certificate should have a subject that's equal to the previous issuer value.