To generate the APNS Service pem certificate required by php

Source: Internet
Author: User
Tags openssl rsa pkcs12

1. log on to the iPhone Developer Connection Portal and click App IDs.
2. Create an App ID that does not use wildcards. The wildcard ID cannot be used for the push notification service. For example, our iPhone program ID is like this: ab123127cd.com. serverdensity. iphone
3. Click "Configure" next to the App ID, and then press the button to generate the push notification license. Follow the steps in the Wizard to generate a signature, upload the signature, and finally download the generated license. This step is also described in the Apple documentation.
4. Double-click the. cer file to introduce your aps_developer_identity.cer to the Keychain.
5. Start the Keychain assistant on Mac, and then select the Certificates category in login keychain. You will see an extensible option "Apple Development Push Services"
6. Expand this option and right-click "Apple Development Push Services"> Export "Apple Development Push Services ID123 ". Save as a apns-dev-cert.p12 file.
7. You need to use terminal commands to convert these files to the PEM format:

Help

1

2

3

Openssl pkcs12-clcerts-nokeys-out apns-dev-cert.pem

In apns-dev-cert.p12

Openssl pkcs12-nocerts-out apns-dev-key.pem-in apns-dev-key.p12

In the second statement, you must set an rsa password for it. If you want to remove the password, do not set or execute it during export/conversion:

Help

1

Openssl rsa-in apns-dev-key.pem-out unencrypted. pem

8. Finally, you need to synthesize the key and license file into a apns-dev.pem file that you need to use when connecting to APNS:

Help

1

Cat apns-dev-cert.pem unencrypted. pem> apns-dev.pem

9. Perform a final test on the certificate, and connect it with SSL.
Development Status server address gateway.sandbox.push.apple.com 2195
Product status server address: gateway.push.apple.com 2195

Help

1

2

Openssl s_client-connect gateway.sandbox.push.apple.com: 2195

-Cert apns-dev-cert.pem-key unencrypted. pem

Check whether the operation is successful.
Note: The Last Thing I pay attention to is my own pitfall. Certificates are divided into two types: development and post-release applications.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.