if(sinfos.size() == 0) {
throw new PKCS7Exception(F_PKCS7_GET0_SIGNERS,R_NO_SIGNERS);
}
for(SignerInfoWithPkey si : sinfos) {
IssuerAndSerialNumber ias = si.getIssuerAndSerialNumber();
X509AuxCertificate signer = null;
// System.err.println("looking for: " + ias.getName() + " and " + ias.getCertificateSerialNumber());
// System.err.println(" in: " + certs);
// System.err.println(" in: " + getSign().getCert());
if(certs != null) {
signer = findByIssuerAndSerial(certs, ias.getName(), ias.getCertificateSerialNumber().getValue());
}
if(signer == null && (flags & NOINTERN) == 0 && getSign().getCert() != null) {
signer = findByIssuerAndSerial(getSign().getCert(), ias.getName(), ias.getCertificateSerialNumber().getValue());
}
if(signer == null) {
throw new PKCS7Exception(F_PKCS7_GET0_SIGNERS,R_SIGNER_CERTIFICATE_NOT_FOUND);
}
signers.add(signer);