Convert some type of RSA key use OpenSSL

Written on 13 June 2016

Convert PEM to PKCS12

openssl pkcs12 -export -inkey privatekey.pem -in cert.pem -certfile cacert.pem -out bundle.p12  

Convert PKCS12 file to PEM

You can then chop the files up with a text editor

openssl pkcs12 -nodes -in bundle.p12 -out bundle.pem  
Read more on openssl convert