Created
June 27, 2014 06:46
-
-
Save kublaios/f01cdf4369c86ddd6d71 to your computer and use it in GitHub Desktop.
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. | |
$ telnet gateway.sandbox.push.apple.com 2195 | |
# Let’s try connecting again, this time using our SSL certificate and private key to set up a secure connection. | |
$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem |
generate pem file and code for APNS :https://iosdevcenters.blogspot.com/2017/09/how-to-create-pem-file-for-apns-ios.html
Good Job, its working perfect.
What is the right output of the openssl command? (to be sure that the certificates are ok) ?
If it's not working with p12 with a password. try it with p12 without a password
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1