-->

Generating a BKS keystore and storing app key

2020-07-23 04:54发布

问题:

I am supposed to create a BKS keystore and store a private Application key which is a 48 character long string in this Keystore. I also have a JCEKS keystore which has this key value already in it. If I try to convert into BKS type keystore using portecle tool, the Key entry is lost.

I am new to JCE. Can someone please guide me as to what needs to be done to import this Key in the Keystore?

Thanks.

回答1:

Try this command

keytool -importcert -v -trustcacerts -file "cacert.pem" -alias ca -keystore "mySrvTruststore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "bcprov-jdk16-145.jar" -storetype BKS -storepass testtest