Collection certColl = certStore.getCertificates(null); Collection crlColl = certStore.getCRLs(null);  assertEquals(certColl.size(), sp.getCertificates("Collection", "BC").getMatches(null).size()); assertEquals(crlColl.size(), sp.getCRLs("Collection", "BC").getMatches(null).size());
    private void verifySignatures(CMSSignedDataParser sp, byte[] contentDigest)         throws Exception    {        CertStore               certs = sp.getCertificatesAndCRLs("Collection", "BC");        SignerInformationStore  signers = sp.getSignerInfos();                Collection              c = signers.getSigners();        Iterator                it = c.iterator();            while (it.hasNext())        {            SignerInformation   signer = (SignerInformation)it.next();            Collection          certCollection = certs.getCertificates(signer.getSID());                Iterator        certIt = certCollection.iterator();            X509Certificate cert = (X509Certificate)certIt.next();                assertEquals(true, signer.verify(cert, "BC"));                        if (contentDigest != null)            {                assertTrue(MessageDigest.isEqual(contentDigest, signer.getContentDigest()));            }        }    }