Android アプリケーションで BKS キーストアを使用しようとしていますが、この例外が発生し続けます。
05-31 19:53:52.963: E/AndroidRuntime(18992): FATAL EXCEPTION: AsyncTask #2
05-31 19:53:52.963: E/AndroidRuntime(18992): java.lang.RuntimeException: An error occured while executing doInBackground()
05-31 19:53:52.963: E/AndroidRuntime(18992): at android.os.AsyncTask$3.done(AsyncTask.java:278)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
05-31 19:53:52.963: E/AndroidRuntime(18992): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.lang.Thread.run(Thread.java:856)
05-31 19:53:52.963: E/AndroidRuntime(18992): Caused by: java.lang.RuntimeException: java.io.IOException: Wrong version of key store.
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity.loadTrustStore(MainActivity.java:691)
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity.access$4(MainActivity.java:677)
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity$2.manipulate(MainActivity.java:273)
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity$ManipulateTrustStoreTask.doInBackground(MainActivity.java:224)
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity$ManipulateTrustStoreTask.doInBackground(MainActivity.java:1)
05-31 19:53:52.963: E/AndroidRuntime(18992): at android.os.AsyncTask$2.call(AsyncTask.java:264)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
05-31 19:53:52.963: E/AndroidRuntime(18992): ... 5 more
05-31 19:53:52.963: E/AndroidRuntime(18992): Caused by: java.io.IOException: Wrong version of key store.
05-31 19:53:52.963: E/AndroidRuntime(18992): at com.android.org.bouncycastle.jce.provider.JDKKeyStore.engineLoad(JDKKeyStore.java:812)
05-31 19:53:52.963: E/AndroidRuntime(18992): at java.security.KeyStore.load(KeyStore.java:589)
05-31 19:53:52.963: E/AndroidRuntime(18992): at org.nick.customcert.https.MainActivity.loadTrustStore(MainActivity.java:684)
05-31 19:53:52.963: E/AndroidRuntime(18992): ... 11 more
バージョン 1.46 の BouncyCastle を使用してキーストアを生成しました。キーツールでテストしました
keytool -list -keystore truststore.bks -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-jdk15on-146.jar -storetype BKS
また、電話でプロバイダーを印刷しました。
05-31 19:53:52.918: D/MainActivity(18992): Version : BouncyCastle Security Provider v1.46 : BouncyCastle Security Provider v1.46
どうすればいいのかわからない...