}
/* Now verify the certificates */
if((flags & NOVERIFY) == 0) {
for(X509AuxCertificate signer : signers) {
StoreContext cert_ctx = new StoreContext();
if((flags & NOCHAIN) == 0) {
if(cert_ctx.init(store, signer, new ArrayList<X509AuxCertificate>(getSign().getCert())) == 0) {
throw new PKCS7Exception(F_PKCS7_VERIFY, -1);
}
cert_ctx.setPurpose(X509Utils.X509_PURPOSE_SMIME_SIGN);
} else if(cert_ctx.init(store, signer, null) == 0) {
throw new PKCS7Exception(F_PKCS7_VERIFY, -1);
}
cert_ctx.setExtraData(1, store.getExtraData(1));
if((flags & NOCRL) == 0) {
cert_ctx.setCRLs((List<X509CRL>)getSign().getCrl());
}
try {
int i = cert_ctx.verifyCertificate();
int j = 0;
if(i <= 0) {
j = cert_ctx.getError();
}
cert_ctx.cleanup();
if(i <= 0) {
throw new PKCS7Exception(F_PKCS7_VERIFY, R_CERTIFICATE_VERIFY_ERROR, "Verify error:" + X509Utils.verifyCertificateErrorString(j));
}
} catch(PKCS7Exception e) {
throw e;