Preparing Certificates - HoopCHINA/node-notific GitHub Wiki

After requesting the certificate from Apple, export your private key as a .p12 file and download the .cer file from the iOS Provisioning Portal.

Now, in the directory containing cert.cer and key.p12 execute the following commands to generate your .pem files:

$ openssl x509 -in cert.cer -inform DER -outform PEM -out cert.pem
$ openssl pkcs12 -in key.p12 -out key.pem -nodes

OR use one pkcs.p12 to generate:

$ openssl pkcs12 -in pkcs.p12 -out cert.pem -clcerts -nokeys
$ openssl pkcs12 -in pkcs.p12 -out key.pem -nocerts -nodes

If you are using a development certificate you may wish to name them differently to enable fast switching between development and production. The filenames are configurable within the module options, so feel free to name them something more appropriate.