I wanted to create a certificate into a PKCS12 keystore format with keytool program.
The keystore has extension .pfx
.
How do I achieve this?
The PKCS#12 (Personal Information Exchange Syntax Standard) specifies a portable format for storage and/or transport of a user's private keys, certificates, miscellaneous secrets, and other items. The IBMJSSE2 provider uses the Java™ 2 KeyStore API that supplies a complete implementation of the PKCS12 java. security.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With