(1) The certificate of the pilot push services, for example, we named "MAGIC_CERT.P12", note that the export will let you enter the password.
(2) Re-export the key for the Push services certificate (Private key), for example, we named "MAGIC_KEY.P12":
5. Convert the P12 file to a PEM file.
(1) Convert two p12 files to a PEM format file, respectively.
Open terminal, and you can convert by typing a command.
The first one:
OpenSSL pkcs12-clcerts-nokeys-out magic_cert.pem-in MAGIC_CERT.P12
The second one:
OpenSSL pkcs12-nocerts-out magic_key.pem-in MAGIC_KEY.P12
Note that you will be prompted to enter the password you exported earlier when you exported the certificate in the keychain.
Note: If the final PEM does not require a password when it is used on the server system, you can execute a command to remove the password:
OpenSSL rsa-in Magic_key.pem-outmagic_key_nopwd.pem
Finally, two PEM files are generated, such as "Magic_cert.pem", "Magic_key.pem or Magic_key_nopwd.pem".
(2) Merge two PEM files into a PEM file required by the server system.
The command line execution is still available:
Cat Magic_cert.pem Magic_key.pem >MAGIC-DEV.PEM
Or do not require a password:
Cat Magic_cert.pem Magic_key_nopwd.pem >MAGIC-DEV.PEM
Eventually, a "Magic-dev.pem" is generated for use by the service-side system.
6, OK, finish the call.
To export a certificate CER file to PEM format