How do I convert jks keystore file to something like PEM?

1.4k views Asked by At

I have a JKS keystore with a couple of certicates signed by CA. I would like to convert this jks file to PCKS12, however TrustedCertEntrys cannot be converted using the Java keytool because they are not supported. How would I convert this jks file to, say, PCKS12 ?

I have looked for similar questions on SO, and this is what I have found:

Convert CA-signed JKS keystore to PEM

However, this did not seem to work for me, as the conversion failed at this step

C:\Temp>openssl x509 -in exported-der.crt -out exported-pem.crt 
-outform pem -inform der

due to this error

[...]PEM routines:PEM_read_bio:no start line:[...]

because it seems to be encrypted or something along those lines.

1

There are 1 answers

2
doptimusprime On

Try following changes in your command

C:\Temp>openssl x509 -in exported-der.crt -out exported-pem.crt -outform PEM -inform DER

Documentation says DER|PEM|NET as valid value, not pem or der.