How to create a certificate into a PKCS12 keystore with keytool?

后端 未结 2 1731
遇见更好的自我
遇见更好的自我 2021-01-31 19:16

I wanted to create a certificate into a PKCS12 keystore format with keytool program.

The keystore has extension .pfx.

How do I achieve this?

2条回答
  •  孤街浪徒
    2021-01-31 19:38

    If the keystore is PKCS12 type (.pfx) you have to specify it with -storetype PKCS12 (line breaks added for readability):

    keytool -genkey -alias  
        -keystore 
        -storetype PKCS12 
        -keyalg RSA 
        -storepass  
        -validity 730 
        -keysize 2048 
    

提交回复
热议问题