Create a .pfx/.p12 Certificate File Using OpenSSL

How to create a .pfx/.p12 certificate from the command line using OpenSSL.