Java 8 CertPathBuilderException - 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 CertPathBuilderException class.

This code example shows how to use the following methods:getCause, getMessage
     * Assertion: constructs CertPathBuilderException when <code>cause</code> 
     * is null 
     */ 
    public void testCertPathBuilderException04() { 
        Throwable cause = null;
        CertPathBuilderException tE = new CertPathBuilderException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CertPathBuilderException(Throwable)</code> constructor 
     * Assertion: constructs CertPathBuilderException when <code>cause</code> 
     * is not null 
     */ 
    public void testCertPathBuilderException05() { 
        CertPathBuilderException tE = new CertPathBuilderException(tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getCause, getMessage
     * Assertion: constructs CertPathBuilderException when <code>cause</code> 
     * is null 
     */ 
    public void testCertPathBuilderException04() { 
        Throwable cause = null;
        CertPathBuilderException tE = new CertPathBuilderException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CertPathBuilderException(Throwable)</code> constructor 
     * Assertion: constructs CertPathBuilderException when <code>cause</code> 
     * is not null 
     */ 
    public void testCertPathBuilderException05() { 
        CertPathBuilderException tE = new CertPathBuilderException(tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    private int swi = 0; 
    public CertPathBuilderResult engineBuild(CertPathParameters params) 
            throws CertPathBuilderException, InvalidAlgorithmParameterException { 
        swi++; 
        if ((params == null) && ((swi %2 ) != 0)) { 
            throw new CertPathBuilderException("Null parameter"); 
        } 
        return null; 
    } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
        CertPathBuilderException dExc = new CertPathBuilderException(msgs[0], cause); 
        String msg = null; 
        Throwable th = null; 
        return new Object[] { new CertPathBuilderException(), new CertPathBuilderException(msg), 
                new CertPathBuilderException(msgs[1]), 
                new CertPathBuilderException(new Throwable()), new CertPathBuilderException(th), 
                new CertPathBuilderException(msgs[1], dExc) }; 
    } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
        CertPathBuilderException dExc = new CertPathBuilderException(msgs[0], cause); 
        String msg = null; 
        Throwable th = null; 
        return new Object[] { new CertPathBuilderException(), new CertPathBuilderException(msg), 
                new CertPathBuilderException(msgs[1]), 
                new CertPathBuilderException(new Throwable()), new CertPathBuilderException(th), 
                new CertPathBuilderException(msgs[1], dExc) }; 
    } 
 
    public static void main(String[] args) { 
        junit.textui.TestRunner.run(CertPathBuilderExceptionTest.class); 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    private int swi = 0; 
    public CertPathBuilderResult engineBuild(CertPathParameters params) 
            throws CertPathBuilderException, InvalidAlgorithmParameterException { 
        swi++; 
        if ((params == null) && ((swi %2 ) != 0)) { 
            throw new CertPathBuilderException("Null parameter"); 
        } 
        return null; 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    private int swi = 0; 
    public CertPathBuilderResult engineBuild(CertPathParameters params) 
            throws CertPathBuilderException, InvalidAlgorithmParameterException { 
        swi++; 
        if ((params == null) && ((swi %2 ) != 0)) { 
            throw new CertPathBuilderException("Null parameter"); 
        } 
        return null; 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    private int swi = 0; 
    public CertPathBuilderResult engineBuild(CertPathParameters params) 
            throws CertPathBuilderException, InvalidAlgorithmParameterException { 
        swi++; 
        if ((params == null) && ((swi %2 ) != 0)) { 
            throw new CertPathBuilderException("Null parameter"); 
        } 
        return null; 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getMessage
     */ 
    public void verify(Certificate[] certs) throws SecurityException {
        try { 
            keyStore.verify((X509Certificate[]) certs);
        } catch (CertPathBuilderException e) {
            throw new SecurityException("Digital signature verification failed: " + e.getMessage());
        } catch (CertificateVerificationException e) {
            throw new SecurityException("Digital signature verification failed: " + e.getMessage());
        } 
    } 
     
    /** 
     * Attempt to verify that a file is signed. 
     *  
     * @param in input stream 
     * @param ext file extension 
     * @throws SecurityException throw on verification failure 
     * @throws IOException on I/O error 
     */ 
    public void verify(InputStream in, String ext) throws SecurityException, IOException {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
        // search target certificates 
 
        Selector certSelect = pkixParams.getTargetConstraints();
        if (!(certSelect instanceof X509CertStoreSelector))
        { 
            throw new CertPathBuilderException(
                "TargetConstraints must be an instance of " 
                    + X509CertStoreSelector.class.getName() + " for "
                    + this.getClass().getName() + " class.");
        } 
 
        try 
        { 
            targets = CertPathValidatorUtilities.findCertificates((X509CertStoreSelector)certSelect, pkixParams.getStores());
            targets.addAll(CertPathValidatorUtilities.findCertificates((X509CertStoreSelector)certSelect, pkixParams.getCertStores()));
        } 
        catch (AnnotatedException e)
        { 
            throw new ExtCertPathBuilderException( 
                "Error finding target certificate.", e);
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 CertPathBuilderException Methods: