Skip to content

Instantly share code, notes, and snippets.

View MariuszWisniewski's full-sized avatar

Mariusz Wisniewski MariuszWisniewski

View GitHub Profile
@MariuszWisniewski
MariuszWisniewski / gist:1b391403e21b081ef90d7e820a505456
Created January 30, 2018 12:02 — 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.