Created
February 20, 2012 21:38
-
-
Save nuthatch/1871625 to your computer and use it in GitHub Desktop.
Automate conversion of Apple Push Certificates into .p12 format for Urban Airship
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/bash | |
if [ -e aps_production.cer ] | |
then | |
echo "Converting production push certificate" | |
security -v create-keychain -p '' temp-production.keychain | |
security -v import aps_production.cer -k temp-production.keychain | |
security -v export -k temp-production.keychain -f pkcs12 -P '' -o push-production.p12 | |
security -v delete-keychain temp-production.keychain | |
fi | |
if [ -e aps_development.cer ] | |
then | |
echo "Converting development push certificate" | |
security -v create-keychain -p '' temp-development.keychain | |
security -v import aps_development.cer -k temp-development.keychain | |
security -v export -k temp-development.keychain -f pkcs12 -P '' -o push-development.p12 | |
security -v delete-keychain temp-development.keychain | |
fi | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment