@Test public void testEngineGetCRLsCRLSelector() throws Exception { SimpleMemoryCertStoreParams params = new SimpleMemoryCertStoreParams(null, null); store = new SimpleMemoryCertStore(params); assertEquals(0, store.engineGetCRLs(new X509CRLSelector()).size()); params = new SimpleMemoryCertStoreParams(new X509Certificate[] {cert}, new X509CRL[] {crl}); store = new SimpleMemoryCertStore(params); assertEquals(1, store.engineGetCRLs(new X509CRLSelector()).size()); X509CRLSelector crlSelector = new X509CRLSelector(); crlSelector.addIssuerName("CN=non-existent"); assertEquals(0, store.engineGetCRLs(crlSelector).size()); }
@Override public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { List<X509CRL> l = new LinkedList<X509CRL>(); for (X509CRL crl : crlStore) { if (selector.match(crl)) { l.add(crl); } } return l; }
SimpleMemoryCertStore extends CertStoreSpi { @Override public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { List<X509CRL> l = new LinkedList<X509CRL>(); for (X509CRL crl : crlStore) { if (selector.match(crl)) { l.add(crl); } } return l; } }
SimpleMemoryCertStore extends CertStoreSpi { @Override public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { List<X509CRL> l = new LinkedList<X509CRL>(); for (X509CRL crl : crlStore) { if (selector.match(crl)) { l.add(crl); } } return l; } SimpleMemoryCertStore(CertStoreParameters params); }
SimpleMemoryCertStore extends CertStoreSpi { @Override public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { List<X509CRL> l = new LinkedList<X509CRL>(); for (X509CRL crl : crlStore) { if (selector.match(crl)) { l.add(crl); } } return l; } SimpleMemoryCertStore(CertStoreParameters params); @Override Collection<? extends CRL> engineGetCRLs(CRLSelector selector); @Override Collection<? extends Certificate> engineGetCertificates(CertSelector selector); }
SimpleMemoryCertStore extends CertStoreSpi { @Override public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { List<X509CRL> l = new LinkedList<X509CRL>(); for (X509CRL crl : crlStore) { if (selector.match(crl)) { l.add(crl); } } return l; } SimpleMemoryCertStore(CertStoreParameters params); @Override Collection<? extends CRL> engineGetCRLs(CRLSelector selector); @Override Collection<? extends Certificate> engineGetCertificates(CertSelector selector);  }