Code example for CertificateFactory

Methods: generateCertificate

0
            throw new OpCertificateException("cannot get encoded form of certificate: " + e.getMessage(), e);
        } 
        catch (NoSuchAlgorithmException e)
        { 
            throw new OpCertificateException("cannot create certificate factory: " + e.getMessage(), e);
        } 
        catch (NoSuchProviderException e)
        { 
            throw new OpCertificateException("cannot find factory provider: " + e.getMessage(), e);
        } 
    } 
 
    // TODO: put somewhere public so cause easily accessed 
    private static class OpCertificateException 
        extends CertificateException
    { 
        private Throwable cause;
 
        public OpCertificateException(String msg, Throwable cause)
        { 
            super(msg);