}
CertStore store = CertStore.getInstance("Collection", new CollectionCertStoreParameters(certsAndCrls), "BC");
//CertPathValidator validator = CertPathValidator.getInstance("PKIX","BC");
PKIXCertPathReviewer reviewer;
PKIXParameters params = new PKIXParameters(trustedSet);
params.addCertStore(store);
params.setRevocationEnabled(true);
params.setDate(new GregorianCalendar(2010, 1, 1).getTime());
if (policies != null)
{
params.setExplicitPolicyRequired(true);
params.setInitialPolicies(policies);
}
reviewer = new PKIXCertPathReviewer(certPath,params);
return reviewer;
}