Skip to content

Instantly share code, notes, and snippets.

@wroscoe
Last active August 29, 2015 14:05
Show Gist options
  • Save wroscoe/9ba590b3f356a01d0ebb to your computer and use it in GitHub Desktop.
Save wroscoe/9ba590b3f356a01d0ebb to your computer and use it in GitHub Desktop.
Steps to create keys necessary for iphone app.

Create cert, pem, and p12 files for your App. following this tutorial

Generate a certificate signing request. Use your own email address!

openssl req -new -key private.key -out CertificateSigningRequest.certSigningRequest

On the “What type of certificate do you need?” Apple page, say “iOS App Development”. Go through its little wizard and upload your CertificateSigningRequest.certSigningRequest file. It will give you back a DEV_APN.cer file.

Convert ios_distribution.cer to ios_distribution.pem

openssl x509 -in DEV_APN.cer -inform DER -out DEV_APN.pem -outform PEM 

Convert ios_distribution.pem to ios_distribution.p12. Enter a password and remember it for later.

openssl pkcs12 -export -inkey private.key -in DEV_APN.pem -out DEV_APN.p12 

Create key file from the p12 file.

openssl pkcs12 -in DEV_APN.p12 -out DEV_APN_CERT_KEY.pem -nodes -clcerts

Create and name the key.pem and cert.pem files for node-apn.

cp DEV_APN.pem  cert.pem
cp DEV_APN_CERT_KEY.pem  key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment