keytool - see the public and private keys

后端 未结 5 1137
半阙折子戏
半阙折子戏 2020-12-30 03:35

I created Java keystore programmatically of type jks (i.e. default type).
It is initially empty so I created a DSA certificate.

keytool -genkey -alias          


        
5条回答
  •  梦谈多话
    2020-12-30 04:18

    No, you cannot.
    You can access the private key from code, but you cannot export it using the keytool.
    Use OpenSSL if you need to export private key.

    Another option: you can generate keystore in PKCS12 format. Then you can import it to a browser and then to export the private key.

提交回复
热议问题