Best code examples for Java 8 CertificateEncodingException class (java.security.cert.CertificateEncodingException)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 CertificateEncodingException class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 CertificateEncodingException examples from Open Source projects
This code example shows how to use the following methods: getMessage
        { 
            return Certificate.getInstance(certificate.getEncoded());
        } 
        catch (CertificateEncodingException e)
        { 
            throw new PKCSIOException("cannot encode certificate: " + e.getMessage(), e);
        } 
    } 
 
    public JcaPKCS12SafeBagBuilder(PrivateKey privateKey, OutputEncryptor encryptor)
    { 
        super(PrivateKeyInfo.getInstance(privateKey.getEncoded()), encryptor);
    } 
 
    public JcaPKCS12SafeBagBuilder(PrivateKey privateKey)
    { 
        super(PrivateKeyInfo.getInstance(privateKey.getEncoded()));
    } 
} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCause, getMessage
     * Test for <code>CertificateEncodingException(Throwable)</code> 
     * constructor Assertion: constructs CertificateEncodingException when 
     * <code>cause</code> is not null 
     */ 
    public void testCertificateEncodingException05() { 
        CertificateEncodingException tE = new CertificateEncodingException(
                tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
            assertTrue("getMessage() should contain ".concat(toS), (getM
                    .indexOf(toS) != -1));
        } 
        assertNotNull("getCause() must not return null", tE.getCause());
        assertEquals("getCause() must return ".concat(tCause.toString()), tE
                .getCause(), tCause);
    } 
 
    /** 
     * Test for <code>CertificateEncodingException(String, Throwable)</code> 
     * constructor Assertion: constructs CertificateEncodingException when 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCause, getMessage
     * constructor Assertion: constructs CertificateEncodingException when 
     * <code>cause</code> is null 
     */ 
    public void testCertificateEncodingException04() { 
        Throwable cause = null;
        CertificateEncodingException tE = new CertificateEncodingException(
                cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CertificateEncodingException(Throwable)</code> 
     * constructor Assertion: constructs CertificateEncodingException when 
     * <code>cause</code> is not null 
     */ 
    public void testCertificateEncodingException05() { 
        CertificateEncodingException tE = new CertificateEncodingException(
                tCause);
        if (tE.getMessage() != null) {
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getMessage
    public void save(OutputStream out) throws IOException {
 
        try { 
            cred.save(out);
        } catch (CertificateEncodingException e) {
            throw new ChainedIOException(e.getMessage(), e);
        } 
    } 
 
    /** 
     * Verifies the validity of the credentials. All certificate path validation is performed using trusted 
     * certificates in default locations. 
     *  
     * @exception GlobusCredentialException 
     *                if one of the certificates in the chain expired or if path validiation fails. 
     */ 
    public void verify() throws GlobusCredentialException { 
        try { 
            String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations();
            String crlPattern = caCertsLocation + "/*.r*";
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: toString
            dOut.writeInt(cEnc.length);
            dOut.write(cEnc);
        } 
        catch (CertificateEncodingException ex)
        { 
            throw new IOException(ex.toString());
        } 
    } 
 
    private Certificate decodeCertificate(
        DataInputStream   dIn)
        throws IOException 
    { 
        String      type = dIn.readUTF();
        byte[]      cEnc = new byte[dIn.readInt()];
 
        dIn.readFully(cEnc);
 
        try 
        { 
Full Snippet Info
5
CodeRank