Does anyone have detailed, step by step, instructions for extracting encryption keys from 509 certificates, and then storing them inside an encrypted jks file?


The Java VM installation includes a tool for performing this exact type of work - on windows systems it is called keytool.exe.

Depending no the situation, there may be multiple steps to the process. For many cases, the two steps in this example will do:

  1. Create a key store. A command similar to the following will create the keystore: keytool -genkey -alias -keystore keystore.jks

  2. Import the signed certificate + private key into the keystore. The following command will do the trick:

keytool -import -keystore keystore.jks -file .crt

The certificate can be provided in a number of different formats. Full documentation is available on Sun's site, here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.