Skip to main content

To create a .pem file, is quick once you have your .p12 certificate.  I won't go through the process regarding p12 file generation as there are many sites that outline these steps.  If you cannot find a site that outlines this make a comment below and I'll point in the right direction.

Open the terminal and go to the path where you save the apns-cert.p12. where and follow the below command to generate the .PEM file.

The command below depends on the following two elements:

  • Name of the .p12 file : {your-cert-file.p12} as apns-cert.p12
  • Name of the .pem output file : {your-pem-file.pem} as apns-cert.pem
openssl pkcs12 -in {your-cert-file.p12} -out {your-pem-file.pem} -nodes -clcerts

Becomes...

openssl pkcs12 -in apns-cert.p12 -out apns-cert.pem -nodes -clcerts

 

Related articles