Jump to content

Talk:Java KeyStore

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Montjoy0 (talk | contribs) at 22:58, 27 April 2012 (you CAN export private keys in two steps). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

You CAN get the private key by converting it to a pkcs12 file first, then extracting the private key with something like openssl. This at least works for the keytool bundled with java 1.7.

keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -srcstoretype JKS -deststoretype PKCS12 -deststorepass:file p12passfile -srcalias somecert -destalias somecert -srcstorepass:file jkspassfile (otheroptions)

openssl pkcs12 -clcerts -in keystore.p12 -password file:p12passfile -nocerts > somecert.key