Package java.security.cert

Examples of java.security.cert.CertificateEncodingException


        // print certificate fingerprints (MD5 and SHA1).
        byte[] encodedCert;
        try {
            encodedCert = x509cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        String strMD5 = "MD5";
        String strSHA1 = "SHA1";
View Full Code Here


     * method documentation for more info
     */
    public byte[] getEncoded(String encoding)
        throws CertificateEncodingException {
        if (!encodings.contains(encoding)) {
            throw new CertificateEncodingException(
                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
        }
        if (encodingsArr[0].equals(encoding)) {
            // PkiPath encoded form
            return getEncoded();
View Full Code Here

     * method documentation for more info
     */
    public byte[] getEncoded(String encoding)
        throws CertificateEncodingException {
        if (!encodings.contains(encoding)) {
            throw new CertificateEncodingException(
                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
        }
        if (encodingsArr[0].equals(encoding)) {
            // PkiPath encoded form
            return getEncoded();
View Full Code Here

        X509Certificate cert = (X509Certificate) keyStore.getCertificate(alias);
        byte[] encodedCert;
        try {
            encodedCert = cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        OutputStream output;
        String fileName = param.getFileName();
View Full Code Here

        // print certificate fingerprints (MD5 and SHA1).
        byte[] encodedCert;
        try {
            encodedCert = x509cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        String strMD5 = "MD5";
        String strSHA1 = "SHA1";
View Full Code Here

        X509Certificate cert = (X509Certificate) keyStore.getCertificate(alias);
        byte[] encodedCert;
        try {
            encodedCert = cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        OutputStream output;
        String fileName = param.getFileName();
View Full Code Here

        // print certificate fingerprints (MD5 and SHA1).
        byte[] encodedCert;
        try {
            encodedCert = x509cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        String strMD5 = "MD5";
        String strSHA1 = "SHA1";
View Full Code Here

     * method documentation for more info
     */
    public byte[] getEncoded(String encoding)
        throws CertificateEncodingException {
        if (!encodings.contains(encoding)) {
            throw new CertificateEncodingException(
                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
        }
        if (encodingsArr[0].equals(encoding)) {
            // PkiPath encoded form
            return getEncoded();
View Full Code Here

           
                pWrt.close();
            }
            catch (Exception e)
            {
                throw new CertificateEncodingException("can't encode certificate for PEM encoded path");
            }

            return bOut.toByteArray();
        }
        else
        {
            throw new CertificateEncodingException("unsupported encoding: " + encoding);
        }
    }
View Full Code Here

        {
            return new ASN1InputStream(cert.getEncoded()).readObject();
        }
        catch (Exception e)
        {
            throw new CertificateEncodingException("Exception while encoding certificate: " + e.toString());
        }
    }
View Full Code Here

TOP

Related Classes of java.security.cert.CertificateEncodingException

Copyright © 2018 www.massapicom. 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.