This file contains hidden or 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
| # First, export aps-key.p12 from aps.cer (on MacOS, can be done from Keychain) | |
| # In Keychain, navigate to "My Certificates", then select the private key of the cert. | |
| # https://stackoverflow.com/questions/15662377/unable-to-export-apple-production-push-ssl-certificate-in-p12-format | |
| # Convert the .cer file into a .pem file: | |
| $ openssl x509 -in aps.cer -inform der -out aps-cert.pem | |
| # Convert the private key’s .p12 file into a .pem file: | |
| $ openssl pkcs12 -nocerts -in aps-key.p12 -out aps-key.pem |