Last active
April 17, 2017 18:58
-
-
Save antongaenko/f3c92cf8d76abe1f8be0 to your computer and use it in GitHub Desktop.
Create server APNS certificate
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
#!/bin/sh | |
# | |
# Install by copy/paste | |
# curl -O https://gist.githubusercontent.com/Just-/f3c92cf8d76abe1f8be0/raw/4181b5fce861037ec10c44c80250bb8a8c38f841/apns-certificate-creator.sh && chmod +x apns-certificate-creator.sh && cp apns-certificate-creator.sh /usr/local/bin/apns-certificate-creator | |
# Create APNS server certificate | |
# $1 - APNS SSL cert from developer.apple.com (.cer) | |
# $2 - developer private key exported from keychain (.p12) | |
# $3 - output certificate with password (.pem) | |
openssl x509 -in "$1" -inform der -out cert.pem | |
openssl pkcs12 -nocerts -out key.pem -in "$2" | |
cat cert.pem key.pem > "$3" | |
rm cert.pem key.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment