I write program in android for communication with server, I use SSL protocol, when I write this code
KeyStore ks = KeyStore.getInstance( "JKS" );
I get this error
java.security.NoSuchAlgorithmException: KeyStore JKS implementation not found
How can I resolve my problem? My Algorithm is JKS.
Best Regards
Android does not support JKS keystore. However you can convert your JKS keystore to BouncyCastle BKS keystore and it will work.
@edit
You will need bcprov-jdk16-145.jar
keytool -importkeystore -srckeystore mytruststore.jks -destkeystore mytruststore.bks -srcstoretype JKS -deststoretype BKS -srcstorepass changeit -deststorepass changeit -provider org.bouncycastle.jce.provider.BouncyCastleProvider
If your bcprov jar is in another directory add -providerpath path.
code taken from: http://www.knowledgebit.appspot.com/zahangirbd/TopicView.action;jsessionid=E2BZt_6bp4uFFbMyq42gWg?id=56001
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