A quick search on net will give you openssl pkcs12 command to achieve this.
steps:
- download openssl if you don’t have already.
- inputs – private rsa key. If you have encoded text from the webhost, save it in a text file. I put it in a private.key
- inputs – domain key – I received a .crt file for this.
- inputs – I received 2 intermediate certificates and one root certificates – all .crt files
- command line – openssl pkcs12 -export -out a.pfx -inkey private.key -in domainkey.crt -certfile f1.crt -certfile f2.crt -certfile root.crt
- updated 2023-04-20 command line – openssl pkcs12 -export -out a.pfx -inkey private.key -in domainkey.crt -certfile cacertfiles.ca-bundle
- recently re-issued cert from namecheap and received ca (intermediate/root) cert files in a file with .ca-bundle extension
- this did the trick to get the .pfx file.
- openssl asked for password to protect the pfx file