I'm using the below code to attempt to load a keystore file and I'm getting an java.io.IOException: Invalid keystore format Exception. Any ideas on how to troubleshoot this or what is causing the issue?
Load Keystore File:
final FileInputStream keyFile = new FileInputStream(filePath
+ "key.p7b");
final KeyStore keyStore = KeyStore.getInstance("JKS");
String storepass = "pwd";
keyStore.load(keyFile, storepass.toCharArray());
Exception:
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
at java.security.KeyStore.load(KeyStore.java:1185)