The P12 file for the iOS push certificate is not a certificate file directly from keychain. It needs to be made by the OpenSSL tool. (Fortunately, Mac OS has the OpenSSL command by default)
For different server platforms, the required certificate is different, first say. NET Framework for the development of the server's certificate production:
(for development and publication purposes, the order is the same.) Only need to provide the appropriate type of documents can be)
To open a command terminal:
Get a pre-made push certificate to make a PEM file
OpenSSL x509-in aps_production.cer-inform der-out aps_production.pem-outform PEM
Export the push certificate from keychain CERTIFICATES.P12
OpenSSL pkcs12-nocerts-out push_noenc.pem-in CERTIFICATES.P12
This step will prompt for input password, enter the password when you export the P12 file, no password directly enter
Enter Import Password:
After entering password
MAC verified OK
Create a certificate for server push
OpenSSL pkcs12-export-in Aps_production.pem-inkey push_noenc.pem-certfile Certificatesigningrequest.certsigningrequest-name "Aps_production"-out aps_production.p12
The above actions are actions under the same folder.
PHP Platform:
References:
Generation of PEM files in the iOS messaging push mechanism
The production of the IOS push certificate