Last active
October 6, 2015 10:11
-
-
Save fahied/abe92b4aee1978e69c45 to your computer and use it in GitHub Desktop.
Preparing APS Certificates for node-apn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After requesting the certificate from Apple, export your private key as a .p12 file and | |
download the .cer file (usually named aps_production.cer or aps_development.cer) 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 aps_development.cer -inform DER -outform PEM -out aps_development.pem | |
openssl x509 -in aps_production.cer -inform DER -outform PEM -out aps_production.pem | |
openssl pkcs12 -in key.p12 -out key.pem -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. | |
It is also possible to supply a PFX (PFX/PKCS12) package containing your certificate, | |
key and any relevant CA certificates. The method to accomplish this is left as an | |
exercise to the reader. It should be possible to select the relevant items in | |
"Keychain Access" and use the export option with ".p12" format. | |
source : | |
https://github.com/argon/node-apn/wiki/Preparing-Certificates | |
https://www.npmjs.org/package/node-pushserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment