Code example for PKIXParameters

Methods: getCertPathCheckerssetCertPathCheckers

        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        PKIXParameters p = new PKIXParameters(taSet);
        PKIXCertPathChecker cpc = TestUtils.getTestCertPathChecker();
        List l = new ArrayList();
        assertTrue("addedOk", l.add(cpc));
        // retrieve checker and modify it 
        PKIXCertPathChecker cpc1 = p.getCertPathCheckers().get(0);
        assertTrue("modifiedOk", cpc1.isForwardCheckingSupported());
        // retrieve checker again and check 
        // that its state has not been changed 
        // by the above modification 
        PKIXCertPathChecker cpc2 = p.getCertPathCheckers().get(0);
        assertFalse("isCloned", cpc2.isForwardCheckingSupported());
     * Test #1 for <code>setCertPathCheckers(List)</code> method<br> 
Stop searching for code, let great code find you!  Add Codota to your java IDE