aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/prov/src/main/jdk1.3/org/spongycastle/jce/MultiCertStoreParameters.java
blob: 42f46648f9a61a00766deb364421c1e79b8ce6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package org.spongycastle.jce;

import org.spongycastle.jce.cert.CertStoreParameters;
import java.util.Collection;

public class MultiCertStoreParameters
    implements CertStoreParameters
{
    private Collection certStores;
    private boolean searchAllStores;

    /**
     * Create a parameters object which specifies searching of all the passed in stores.
     *
     * @param certStores CertStores making up the multi CertStore
     */
    public MultiCertStoreParameters(Collection certStores)
    {
        this(certStores, true);
    }

    /**
     * Create a parameters object which can be to used to make a multi store made up
     * of the passed in CertStores. If the searchAllStores parameter is false, any search on
     * the multi-store will terminate as soon as a search query produces a result.
     * 
     * @param certStores CertStores making up the multi CertStore
     * @param searchAllStores true if all CertStores should be searched on request, false if a result
     * should be returned on the first successful CertStore query.
     */
    public MultiCertStoreParameters(Collection certStores, boolean searchAllStores)
    {
        this.certStores = certStores;
        this.searchAllStores = searchAllStores;
    }

    public Collection getCertStores()
    {
        return certStores;
    }

    public boolean getSearchAllStores()
    {
        return searchAllStores;
    }

    public Object clone()
    {
        return this;
    }
}