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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With