Apple Push Notifications converting p12 to pem files

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at:

None of the commands listed on this page worked for me, and yet that is the topped ranked page in Google. What did work for me:

openssl pkcs12 -in apns_certificates.p12  -out apns_certificates.pem -nodes

openssl pkcs12 -in apns_key.p12  -out apns_key.pem -nodes

chmod 0400 apns_key.pem 

chmod 0400 apns_certificates.pem 

openssl s_client -connect -cert apns_certificates.pem -key apns_key.pem

cat apns_certificates.pem apns_key.pem   > Peeroapp.pem