Code example for PKIXParameters

Methods: isExplicitPolicyRequired, setExplicitPolicyRequired

0
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        PKIXParameters p = new PKIXParameters(taSet);
        p.setExplicitPolicyRequired(true);
        assertTrue("setTrue", p.isExplicitPolicyRequired());
        p.setExplicitPolicyRequired(false);
        assertFalse("setFalse", p.isExplicitPolicyRequired());
    } 
 
    /** 
     * Test for <code>isPolicyMappingInhibited()</code> method<br> 
     * Assertion: returns true if policy mapping is inhibited, false otherwise 
     * Assertion: by default, policy mapping is not inhibited (the flag is false) 
     * @throws InvalidAlgorithmParameterException 
     */ 
    public final void testIsPolicyMappingInhibited() throws Exception { 
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {