Hi Everyone,
I am trying to load the keystore with the private key and password, but i am facing an exception.
Here the exception is :
java.io.IOException: Wrong version of key store.
at org.bouncycastle.jce.provider.JDKKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1150)
at XML.Decryptor.keystoreTest(Decryptor.java:329)
at XML.Decryptor.main(Decryptor.java:349)
my Code is :
String passPhrase="password";
FileInputStream privKey = null;
privKey = new FileInputStream("C:/TEMP/secring.asc");
KeyStore ks = KeyStore.getInstance("BKS");
ks.load(privKey, passPhrase.toCharArray());
here privKey is the Private key generated using open pgp boouncy castle encryption, and i want to store this in the keystore of BKS.
Cansomeone please help me, I am not able to understand how to proceed, even googling doesnt helped me.
Correct me in the above way of doing if my approach is wrong.
thank you in advance.
Regards,
Harish Ponduri.