Convert CA-signed JKS keystore to PEM

前端 未结 3 1440
一个人的身影
一个人的身影 2021-02-01 23:20

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 chai

3条回答
  •  灰色年华
    2021-02-01 23:50

    You can easily convert a JKS file into a PKCS12 file:

    keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12
    

    You can then extract the private key and any certs with:

    openssl pkcs12 -in keystore.p12
    

提交回复
热议问题