PKCS#12 archives (commonly known as .pfx
files) usually contain both a certificate and its private key, sometimes with password protection. In order to use these with a server like nginx or Apache, we need to extract these objects and convert them using openssl.
(The commands below assume your file is named certificate.pfx
.)