Skip to content

Instantly share code, notes, and snippets.

View hh2k's full-sized avatar

Henrik Hansen hh2k

  • Aalborg, Denmark
View GitHub Profile
@hh2k
hh2k / gist:1764cc2be6f720660d098090ec550eed
Created September 21, 2016 10:00 — forked from kublaios/gist:f01cdf4369c86ddd6d71
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
# Convert the .cer file into a .pem file:
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem
# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem
# At this point it’s a good idea to test whether the certificate works.