public static X509Certificate readPemCertificate ( final File file ) throws IOException , CertificateException { final String privateKeyAsString = readPemFileAsBase64 ( file ) ; final byte [ ] decoded = new Base64 ( ) . decode ( privateKeyAsString ) ; return readCertificate ( decoded ) ; }
Read pem certificate .