TrustAnchor trustanchor = null;
trustanchor = new TrustAnchor((X509Certificate)rootcert, null);
trustancors.add(trustanchor);
// Create the parameters for the validator
PKIXParameters params = new PKIXParameters(trustancors);
// Disable CRL checking since we are not supplying any CRLs
params.setRevocationEnabled(false);
params.setDate( new Date() );
// Create the validator and validate the path
CertPathValidator certPathValidator = CertPathValidator.getInstance(CertPathValidator.getDefaultType(), "BC");
CertificateFactory fact = CertTools.getCertificateFactory();
CertPath certpath = fact.generateCertPath(calist);