How can I create a .p12 or .pfx file without a private key?

There is a very handy GUI tool written in java called portecle which you can use for creation of an empty PKCS#12 keystore and also for an import of the certificate without the private key into the PKCS#12 keystore – this functionality is available under “Import trusted certificate (Ctrl-T)” button.

However if you insist on using OpenSSL you can use this command:

openssl pkcs12 -export -nokeys -in certificate.cer -out pkcs12.pfx

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)