Code example for PKIXParameters

Methods: getTargetCertConstraintssetTargetCertConstraints

0
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        X509CertSelector x509cs = new X509CertSelector();
        x509cs.setIssuer(testIssuer);
        PKIXParameters p = new PKIXParameters(taSet);
        p.setTargetCertConstraints(x509cs);
        assertEquals("set",
          testIssuer,
          ((X509CertSelector)p.getTargetCertConstraints()).getIssuerAsString());
        p.setTargetCertConstraints(null);
        assertNull("unset", p.getTargetCertConstraints());
    } 
 
    /** 
     * Test #2 for <code>setTargetCertConstraints(CertSelector)</code> method<br> 
     * Assertion: ... the CertSelector specified is cloned to protect against 
     * subsequent modifications 
     * @throws IOException 
     * @throws InvalidAlgorithmParameterException 
Connect your IDE to all the code out there  Get Codota for Java