code: 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);
  	}
docs: Read pem certificate.
  
  @param file
  the file
  @return the certificate
  
  @throws IOException
  Signals that an I/O exception has occurred.
  @throws CertificateException
  is thrown if no Provider supports a CertificateFactorySpi implementation for the
  specified type.