Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'prov/src/main/java/org/bouncycastle/jce/provider/MultiCertStoreSpi.java')
-rw-r--r--prov/src/main/java/org/bouncycastle/jce/provider/MultiCertStoreSpi.java85
1 files changed, 0 insertions, 85 deletions
diff --git a/prov/src/main/java/org/bouncycastle/jce/provider/MultiCertStoreSpi.java b/prov/src/main/java/org/bouncycastle/jce/provider/MultiCertStoreSpi.java
deleted file mode 100644
index cf3d15d7..00000000
--- a/prov/src/main/java/org/bouncycastle/jce/provider/MultiCertStoreSpi.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.bouncycastle.jce.provider;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.cert.CRLSelector;
-import java.security.cert.CertSelector;
-import java.security.cert.CertStore;
-import java.security.cert.CertStoreException;
-import java.security.cert.CertStoreParameters;
-import java.security.cert.CertStoreSpi;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.bouncycastle.jce.MultiCertStoreParameters;
-
-public class MultiCertStoreSpi
- extends CertStoreSpi
-{
- private MultiCertStoreParameters params;
-
- public MultiCertStoreSpi(CertStoreParameters params)
- throws InvalidAlgorithmParameterException
- {
- super(params);
-
- if (!(params instanceof MultiCertStoreParameters))
- {
- throw new InvalidAlgorithmParameterException("org.bouncycastle.jce.provider.MultiCertStoreSpi: parameter must be a MultiCertStoreParameters object\n" + params.toString());
- }
-
- this.params = (MultiCertStoreParameters)params;
- }
-
- public Collection engineGetCertificates(CertSelector certSelector)
- throws CertStoreException
- {
- boolean searchAllStores = params.getSearchAllStores();
- Iterator iter = params.getCertStores().iterator();
- List allCerts = searchAllStores ? new ArrayList() : Collections.EMPTY_LIST;
-
- while (iter.hasNext())
- {
- CertStore store = (CertStore)iter.next();
- Collection certs = store.getCertificates(certSelector);
-
- if (searchAllStores)
- {
- allCerts.addAll(certs);
- }
- else if (!certs.isEmpty())
- {
- return certs;
- }
- }
-
- return allCerts;
- }
-
- public Collection engineGetCRLs(CRLSelector crlSelector)
- throws CertStoreException
- {
- boolean searchAllStores = params.getSearchAllStores();
- Iterator iter = params.getCertStores().iterator();
- List allCRLs = searchAllStores ? new ArrayList() : Collections.EMPTY_LIST;
-
- while (iter.hasNext())
- {
- CertStore store = (CertStore)iter.next();
- Collection crls = store.getCRLs(crlSelector);
-
- if (searchAllStores)
- {
- allCRLs.addAll(crls);
- }
- else if (!crls.isEmpty())
- {
- return crls;
- }
- }
-
- return allCRLs;
- }
-}