This repository has been archived by the owner on Mar 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Generating Certificates
Julian Russell edited this page Jun 17, 2013
·
6 revisions
- Open up Keychain Access and select the
Certificates
category in the sidebar. - Expand the disclosure arrow next to the iOS Push Services certificate you want to export.
- Select both the certificate and private key.
- Right click and select
Export 2 items...
. - Save the file as
cert.p12
, make sure the File Format isPersonal Information Exchange (p12)
. - Convert the certificate to a .pem, where
<environment>
should besandbox
orproduction
, depending on the certificate you exported.
Without a password
openssl pkcs12 -nodes -clcerts -in cert.p12 -out <environment>.pem
With a password
openssl pkcs12 -clcerts -in cert.p12 -out <environment>.pem
Exporting to p12 (steps 1 to 5 above):
openssl pkcs12 -export -in certificate.pem -inkey privkey.pem -out cert.p12
To join the certificate and private key to a single .pem file:
Without a password
openssl pkcs12 -nodes -clcerts -in cert.p12 -out <environment>.pem
With a password
openssl pkcs12 -clcerts -in cert.p12 -out <environment>.pem