private Certificate generateCertificate ( ) throws IOException , CertificateException { InputStream caInput = null ; try { CertificateFactory cf = CertificateFactory . getInstance ( "X.509" ) ; caInput = new ByteArrayInputStream ( caCertificate . getBytes ( "UTF-8" ) ) ; return cf . generateCertificate ( caInput ) ; } finally { IOUtil . closeResource ( caInput ) ; } }
Generates CA Certificate from the default CA Cert file or from the externally provided ca - certificate property .