How do I list / export private keys from a keystore?

后端 未结 9 575
轮回少年
轮回少年 2020-11-30 19:26

How do I list and export a private key from a keystore?

9条回答
  •  -上瘾入骨i
    2020-11-30 19:57

    If you don't need to do it programatically, but just want to manage your keys, then I've used IBM's free KeyMan tool for a long time now. Very nice for exporting a private key to a PFX file (then you can easily use OpenSSL to manipulate it, extract it, change pwds, etc).

    https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=6fb00498-f6ea-4f65-bf0c-adc5bd0c5fcc

    Select your keystore, select the private key entry, then File->Save to a pkcs12 file (*.pfx, typically). You can then view the contents with:

    $ openssl pkcs12 -in mykeyfile.pfx -info

提交回复
热议问题