code: public static KeyStore pem2Keystore(File pemFile) throws IOException, CertificateException, 
  			InvalidKeySpecException, NoSuchAlgorithmException, KeyStoreException {
  		String certAndKey = FileUtils.readFileToString(pemFile, StandardCharsets.US_ASCII);
  	    byte[] certBytes = extractCertificate(certAndKey);
  	    byte[] keyBytes = extractPrivateKey(certAndKey);
  
  	    return pem2KeyStore(certBytes, keyBytes);
  	}
docs: Code c/o http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem
  @param pemFile
  @return
  @throws IOException
  @throws CertificateException
  @throws InvalidKeySpecException
  @throws NoSuchAlgorithmException
  @throws KeyStoreException