Convert CA-signed JKS keystore to PEM
问题 I have a JKS keystore with certicate signed by CA. I need to export it in PEM format in order to use it with nginx. I need to do it in such a way that it includes the whole chain, so that my client can verify the signature. If I do something like: keytool -exportcert -keystore mykestore.jks -file mycert.crt -alias myalias openssl x509 -out mycert.crt.pem -outform pem -in mycert.crt -inform der It only includes the lowest level certificate. The verification fails: $ openssl s_client -connect