Examples of PKIXCertPathChecker


Examples of java.security.cert.PKIXCertPathChecker

     *
     * @return Stub implementation of the <code>PKIXCertPathChecker</code>
     */
    public static PKIXCertPathChecker getTestCertPathChecker() {
        // stub implementation for testing purposes only
        return new PKIXCertPathChecker() {
            private boolean forward = false;

            public void check(Certificate arg0, Collection arg1)
                    throws CertPathValidatorException {
            }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        for (int i = 0; i<p.length; i++) {
            p[i] = new PKIXParameters(ks);

            p[i].setCertStores(TestUtils.getCollectionCertStoresList());

            PKIXCertPathChecker cpc = TestUtils.getTestCertPathChecker();
            List l = new ArrayList();
            assertTrue("addedOk", l.add(cpc));
            p[i].setCertPathCheckers(l);

            p[i].setDate(new Date(555L));
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

     *
     * @return Stub implementation of the <code>PKIXCertPathChecker</code>
     */
    public static PKIXCertPathChecker getTestCertPathChecker() {
        // stub implementation for testing purposes only
        return new PKIXCertPathChecker() {
            private boolean forward = false;

            public void check(Certificate arg0, Collection arg1)
                    throws CertPathValidatorException {
            }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

    //
    // Tests
    //

    public final void testClone() {
        PKIXCertPathChecker pc1 = TestUtils.getTestCertPathChecker();
        PKIXCertPathChecker pc2 = (PKIXCertPathChecker) pc1.clone();
        assertNotSame("notSame", pc1, pc2);
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

    // that are abstract in <code>PKIXCertPathChecker</code>
    // (So they just like signature tests)
    //

    public final void testIsForwardCheckingSupported() {
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.isForwardCheckingSupported();
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        pc.isForwardCheckingSupported();
    }

    public final void testInit()
        throws CertPathValidatorException {
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.init(true);
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.init(true);
    }

    public final void testGetSupportedExtensions() {
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.getSupportedExtensions();
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        pc.getSupportedExtensions();
    }

    public final void testCheck()
        throws CertPathValidatorException {
        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
        pc.check(new MyCertificate("", null), new HashSet());
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        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));
        p.setCertPathCheckers(l);
        // retrieve checker and modify it
        PKIXCertPathChecker cpc1 = p.getCertPathCheckers().get(0);
        cpc1.init(true);
        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());
    }
View Full Code Here

Examples of java.security.cert.PKIXCertPathChecker

        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));
        p.setCertPathCheckers(l);
        List l1 = p.getCertPathCheckers();
        assertNotNull("notNull", l1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.