http://blog.csdn.net/andrew57/article/details/20052381
Record the following mainly used for a long time, you will forget, but also requery.
1. Start the Keychain-->login keychain--> certificates classification on the Mac. You will see development, publishing, and push certificates. "Apple Development push Services" is the push certificate prefix, which is the secret key after the certificate is expanded.
2. Extend this option and then right-click "Apple Development push Services" > Export "apple Development push Services:app ID". Save as a apns-cert.p12 file.
3. Extended "Apple Development Push Services" to the "Private Key" to do the same operation, save as a apns-key.p12 file.
4. Open terminal to convert p12 file to PEM format:
OpenSSL pkcs12-clcerts-nokeys-out apns-cert.pem-in APNS-CERT.P12
OpenSSL pkcs12-nocerts-out apns-key.pem-in APNS-KEY.P12
5. Need to remove the password, export/conversion do not set or execute:
OpenSSL rsa-in apns-key.pem-out Apns-key-noenc.pem
6. Merging certificates and keys, using SSL to connect to APNs will use:
Cat Apns-cert.pem Apns-key-noenc.pem > Apns-dev.pem
Or:
1.
OpenSSL pkcs12-clcerts-nokeys-out apns-cert.pem-in APNS-CERT.P12
Do not encrypt, to encrypt remove-nodes
OpenSSL pkcs12-nocerts-out apns-key.pem-in apns-key.p12-nodes
2. The merger
Cat Apns-cert.pem Apns-key.pem > Apns-dev.pem
Window below is:
copy/b Apns-cert.pem+apns-key.pem Apns-dev.pem