Package org.bouncycastle.jce

Examples of org.bouncycastle.jce.MultiCertStoreParameters


        CertStore store2 = CertStore.getInstance("Collection", ccsp, "BC");

        List storeList = new ArrayList();
        storeList.add(store1);
        storeList.add(store2);
        CertStore store = CertStore.getInstance("Multi", new MultiCertStoreParameters(storeList));

        // Searching for rootCert by subjectDN
        X509CertSelector targetConstraints = new X509CertSelector();
        targetConstraints.setSubject(rootCert.getSubjectX500Principal().getName());
        Collection certs = store.getCertificates(targetConstraints);

        if (certs.size() != 2 || !certs.contains(rootCert))
        {
            fail("2 rootCerts not found by subjectDN");
        }

        store = CertStore.getInstance("Multi", new MultiCertStoreParameters(storeList, false));
        certs = store.getCertificates(targetConstraints);
       
        if (certs.size() != 1 || !certs.contains(rootCert))
        {
            fail("1 rootCert not found by subjectDN");
View Full Code Here

TOP

Related Classes of org.bouncycastle.jce.MultiCertStoreParameters

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.