SSL conversion of .pfx to .pem format
When exporting an SSL certificate from Windows the prefered format is .pfx, which I believe stands for file exchange format. You can export the SSLs private key and extended properties, and then import the .pfx file into another Windows machine, and hence migrate the SSL certificate between machines.
However, on occasion I wish to import the .pfx file into AWS's Certificate Manager for use on load-balancers, CloudFront etc., and AWS will only let you import SSL certificates of format .pem, and hence my need to convert .pfx into .pem.
This can easily be achived if you have OpenSSL installed on your machine using the simple command:
openssl pkcs12 -in src-ssl.pfx -out dest-ssl.pem -nodesThe resulting file contains three distinct sections: 1) private key; 2) certificate; and certificates in the chain of trust, intermidiate and root.