Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert JKS file to BKS or create BKS file

Tags:

android

ssl

I want to connect server with ssl in android, I used from JKS, but I can not use JKS in android, I must change jks to bks, how can create bks file, I used from below order for conver jks to bks file : “keytool -importkeystore -srckeystore mytruststore.jks -destkeystore mytruststore.bks -srcstoretype JKS -deststoretype BKS -srcstorepass changeit -deststorepass changeit -provider org.bouncycastle.jce.provider.BouncyCastleProvider”

But I could not, can I use open ssl software? How can resolve my problem? Best Regards

like image 483
user3693568 Avatar asked Dec 02 '22 19:12

user3693568


2 Answers

The easier is using program "KeyStore Explorer" -> http://keystore-explorer.org/downloads.html

From Tools - Change KeyStore Type - BKS

Regards

like image 162
Jorge Garcia Avatar answered Dec 21 '22 11:12

Jorge Garcia


The correct command should looks like :

keytool -importkeystore -srckeystore testkeys -srcstoretype JKS -srcstorepass passphrase -destkeystore testkeys.bks -deststoretype BKS -deststorepass password -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath C:\Personal\Work\lib\bouncycastle\bcprov-jdk15on-152.jar

You need to supply the provider path so that it can find it when doing conversion.

like image 42
PixelsTech Avatar answered Dec 21 '22 10:12

PixelsTech