Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"stream does not represent a PKCS12 key store" after storing with a new password on Android device [closed]

I wrote an Android application that uses a KeyStore to authenticate SSL connection. But when I load the p12 file with the right key and stores it with a new one, the next time I try to load it with the new key I get this exception:

java.io.IOException: stream does not represent a PKCS12 key store
at com.android.org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad (JDKPKCS12KeyStore.java:691)
at java.security.KeyStore.load(KeyStore.java:589)

What goes wrong?

Thank you very much!

like image 973
Assaf Gamliel Avatar asked Jan 27 '13 09:01

Assaf Gamliel


1 Answers

The problem was (I'm shame to admit) storing a different KeyStore by mistake. Making sure I work on the same KeyStore fixed the problem and now it works perfectly.

like image 169
Assaf Gamliel Avatar answered Oct 09 '22 13:10

Assaf Gamliel