Question: how convert pfx to pem?
Answer: Open a command line window and change to the directory where you installed OpenSSL, i.e. c:\OpenSLL-Win64\bin\.
Run the following command to extract the private key and save it to a new file: openssl pkcs12 -in yourpfxfile.pfx -nocerts -out privatekey.pem -nodes.