Java 8 PKIXCertPathChecker - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 PKIXCertPathChecker class.

This code example shows how to use the following methods:getSupportedExtensions
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.init(true);
    } 
    public final void testGetSupportedExtensions() { 
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.getSupportedExtensions();
    } 
    public final void testCheck() throws CertPathValidatorException {
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.check(new MyCertificate("", null), new HashSet<String>());
    } 
 
    class MyPKIXCertPathChecker extends PKIXCertPathChecker {
 
        public MyPKIXCertPathChecker() { 
            super(); 
        } 
 
        @Override 
        public void check(Certificate cert,
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:init
        } 
 
        PKIXParameters p = new PKIXParameters(taSet);
        PKIXCertPathChecker cpc = TestUtils.getTestCertPathChecker();
        List l = new ArrayList();
        assertTrue("addedOk", l.add(cpc));
        p.setCertPathCheckers(l);
        // modify checker 
        cpc.init(true);
        // retrieve list and check that CertPathChecker's 
        // state it contains has not been changed by the 
        // above modification 
        PKIXCertPathChecker cpc1 = p.getCertPathCheckers().get(0);
        assertFalse("isCopied", cpc1.isForwardCheckingSupported());
    } 
 
    /** 
     * Test #5 for <code>setCertPathCheckers(List)</code> method<br> 
     * Assertion: <code>ClassCastException</code> - 
     * if any of the elements in the list are not of type 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 PKIXCertPathChecker Methods: