RyanCW
RyanCW

Reputation: 1032

Android: java.io.IOException: Wrong Version of key store

This error occurs when I try to log into my app with a lower version of android. All phones/Emulators that have android 4.3 and up are able to log in without error where as phones and tablets with version 4.1.1 give the error below. We think it is because of the lower version of android and are looking for any solution.

java.io.IOException: Wrong Version of key store
at com.android.org.bouncycastle.jce.provider.JDKKeyStore.engineLoad(JDKKeyStore.java:812)
at java.security.KeyStore.load(KeyStore.java:589)

I have currently tried to lower my version of bouncy castle to 146 like in this link

"Wrong version of key store" error. How can I create a version=1 keystore certificate?

I have been stuck on this problem for a day now so any help will be greatly appreciated.

Regards,

Ryan

Upvotes: 8

Views: 8786

Answers (2)

Robin
Robin

Reputation: 554

Mostly you're using different KeyStore type. If running on Android, mostly it needs to be of BKS (BouncyCastle KeyStore) and doesn't support JKS (Java KeyStore), as of Oct 2021. Easy way to switch is to use KeyStore Explorer, downloadable on Mac and Windows. And open the KeryStore file and should be able to change KeyStore type.

If this is is not the case, it should be to change Version from 3 to 1.

Upvotes: 0

Omer Arshad
Omer Arshad

Reputation: 520

I had the same issue but problem solved using the KeyStore Explorer. Create a new KeyStore and select "BKS-V1" type. Then you can import or re-create new keypairs and certificates.

Upvotes: 8

Related Questions