Skip to content

Instantly share code, notes, and snippets.

@Kevinwlee
Created February 2, 2016 15:13
Show Gist options
  • Save Kevinwlee/e42bb5adb2e860f34678 to your computer and use it in GitHub Desktop.
Save Kevinwlee/e42bb5adb2e860f34678 to your computer and use it in GitHub Desktop.
Creating PEMs for ContextHub

Certificates

Before you can use the push services you will need to create a Production and Sandbox push certificate for you application.

After you have downloaded your push certificates, you will need to create a PEM file out of both of them.

  1. Open the Keychain Access application and select your production certificate and its private key.
  2. From the File menu select "Export Items..."
  3. Name the export "Certificates.p12" and save them to your desktop.
  4. Open a terminal window and change directories to your Desktop
  5. run the following command line

openssl pkcs12 -in Certificates.p12 -out certificate.pem -nodes -clcerts

  1. Open "certificate.pem" using your favorite text editor.
  2. Copy all of the contents of the pem file and paste it into the certificate field located under the settings for your application on ContextHub.com.

Now repeat the previous steps, this time start by exporting your Development certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment