Code example for PKIXParameters

Methods: addCertStore, getCertStores

0
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        PKIXParameters p = new PKIXParameters(taSet);
        p.addCertStore(CertStore.getInstance("Collection",
                new CollectionCertStoreParameters()));
        assertFalse(p.getCertStores().isEmpty());
    } 
 
    /** 
     * Test #2 for <code>addCertStore(CertStore)</code> method<br> 
     * Assertion: if <code>null</code>, the store is ignored (not added to list)  
     * @throws InvalidAlgorithmParameterException 
     */ 
    public final void testAddCertStore02() throws Exception { 
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        }