static KeyStore getKeyStoreInstance(String keystorePath, char[] pwd)
			throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException {

		File keystoreFile = new File(keystorePath);
		boolean isPKCS12 = ApplicationKeyManagerUtils.PKCS_FILENAME_FILTER.accept(keystoreFile);
		String type = isPKCS12 ? "PKCS12" : "JKS"; // JKS assumed if not PKCS
		KeyStore ks = KeyStore.getInstance(type);

		InputStream fis = new FileInputStream(keystorePath);
		BufferedInputStream bis = new BufferedInputStream(fis);
		try {
			ks.load(bis, pwd);
		}
		finally {
			bis.close();
		}
		return ks;
	}
Attempt to load a client/server keystore in a PKCS12 form (*.p12, *.pks, *.pfx) or 
Java JKS (*.jks) form.
@param path keystore file path
@param pwd keystore password
@return keystore instance
@throws IOException
@throws KeyStoreException
@throws NoSuchAlgorithmException
@throws CertificateException
Ghidra/Framework/Generic/src/main/java/ghidra/net/ApplicationKeyStore.java