I wanted to create a certificate into a PKCS12 keystore format with keytool program.
The keystore has extension .pfx
.
How do I achieve this?
If the keystore is PKCS12 type (.pfx
) you have to specify it with -storetype PKCS12
(line breaks added for readability):
keytool -genkey -alias <desired certificate alias>
-keystore <path to keystore.pfx>
-storetype PKCS12
-keyalg RSA
-storepass <password>
-validity 730
-keysize 2048