Generate a Push Certificate
To send Push notification to an application/device couple you need an unique device token (see the ObjectiveC page) and a certificate.
Generate a Push Certificate
To generate a certificate on a Mac OS X:
- Log-in to the iPhone Developer Program Portal
- Choose App IDs from the menu on the right (or click here)
- Create an App ID without a wildcard. For example 3L223ZX9Y3.com.armiento.test
- Click the Configure link next to this App ID and then click on the button to start the wizard to generate a new Development Push SSL Certificate (Apple Documentation: Creating the SSL Certificate and Keys)
- Download this certificate and double click on aps_developer_identity.cer to import it into your Keychain
- Launch Keychain Assistant (located in Application, Utilities or search for it with Spotlight) and click on My Certificates on the left
- Expand Apple Development Push Services and select Apple Development Push Services AND your private key (just under Apple Development Push Services)
- Right-click and choose "Export 2 elements..." and save as server_certificates_bundle_sandbox.p12 (don't type a password).
- Open Terminal and change directory to location used to save server_certificates_bundle_sandbox.p12 and convert the PKCS12 certificate bundle into PEM format using this command (press enter when asked for Import Password):
openssl pkcs12 -in server_certificates_bundle_sandbox.p12 -out server_certificates_bundle_sandbox.pem -nodes -clcerts
- Now you can use this PEM file as your certificate in ApnsPHP!
Verify peer using Entrust Root Certification Authority
Download the Entrust Root Authority certificate directly from Entrust Inc. website:
- Navigate to https://www.entrust.net/downloads/root_index.cfm
- Choose "Personal Use"
- Download the Entrust CA (2048) file (entrust_2048_ca.cer) https://www.entrust.net/downloads/binary/entrust_2048_ca.cer for the Sandbox environment; download the Entrust Secure Server CA file (entrust_ssl_ca.cer) https://www.entrust.net/downloads/binary/entrust_ssl_ca.cerfor the Production environment until December 22nd (after December 22nd, 2010 you have to use entrust_2048_ca.cer also for the Production Environment as Apple said: "To ensure you can continue to validate your server's connection to the Apple Push Notification service, you will need to update your push notification server with a copy of the 2048-bit root certificate from Entrust's website.").
If you want to use the same file for the Sandbox and the Production environment please concat the two certificates. For example:
wget https://www.entrust.net/downloads/binary/entrust_2048_ca.cer -O - > entrust_root_certification_authority.pem
echo >> entrust_root_certification_authority.pem
wget https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer -O - >> entrust_root_certification_authority.pem
Otherwise (for use only in a Mac OS X environment), export the Entrust Root Authority certificate:
- Launch Keychain Assistant (located in Application, Utilities or search for it with Spotlight) and click on System Root Certificate on top-left and Certificates on the bottom-left
- Right-click on Entrust Root Certification Authority and export with entrust_root_certification_authority.pem file name and choose as document format Privacy Enhanced Mail (.pem).
- Now you can use this PEM file as Entrust Root Certification Authority in ApnsPHP to verify Apple Peer!
Please, use ApnsPHP Google Group for help requests or to discuss about this project. To report an issue use Issues. Thanks!
一个非常好的中文介绍:http://www.cnblogs.com/menghe/archive/2012/02/20/2359278.html
Generate a Push Certificate的更多相关文章
- push certificate
developer_identity.cer <= download from Applemykey.p12 <= Your private key openssl x509 -in de ...
- iOS APNS配置(转)
Introduction To send Push notification to an application/device couple you need an unique device tok ...
- (转)How to renew your Apple Push Notification Push SSL Certificate
转自:https://blog.serverdensity.com/how-to-renew-your-apple-push-notification-push-ssl-certificate/ It ...
- [ScreenOS] How to manually generate a new system self-signed certificate to replace the expired system self-signed certificate without resetting the firewall
SUMMARY: This article provides information on how to manually generate a new system self-signed cert ...
- (转)How to build an Apple Push Notification provider server (tutorial)
转自:https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ ...
- (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2
转自:http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 Upda ...
- Windows Store Apps, Error: The certificate specified has expired.(转)
Windows Store Apps, Error: The certificate specified has expired. 0 comments|Posted on October 7th, ...
- [ScreenOS] How to change the certificate that is used for SSL (HTTPS) WebUI Management
SUMMARY: This article provides information on how to change the certificate that is used for SSL (HT ...
- Glossary
Glossary term terminology Certificate authority A norganization that authorizes a certificate. Certi ...
随机推荐
- 源码编译安装Python3及问题解决
https://chowyi.com/%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85Python3%E5%8F%8A%E9%97%AE%E ...
- idea gradle卡主问题
http://services.gradle.org/distributions/ 首先下载 all 版本 ,解压 ,再d盘, 并保留zip 文件 ,新建环境变量 GRADLE_HOME 指向 ...
- vuex的几个细节
vuex中的state值一般是不能再外面修改的,如果开发者外面修改store里面的值就失去其存在的意义了,这里需要其加属性如下所示: const isDev = process.env.NODE_EN ...
- openlayers/// Puppeteer.js
1.定位;https://viglino.github.io/ol3-ext/examples/map.interaction.geolocationdraw.html 2 .添加Overlay d ...
- maven 配置 阿里仓库
<mirror><id>nexus-aliyun</id><mirrorOf>central</mirrorOf><name>N ...
- JMeter学习(十)参数化User Defined Variables与User Parameters(转载)
转载自 http://www.cnblogs.com/yangxia-test 偶然发现JMeter中有两个元件(User Defined Variables与User Parameters)很相近, ...
- Python基础之列表及元组的增删改查
定义一个列表 晚上的状态不太适合写博客,容易犯困~ 列表的增加有三种方式 第一种主流的增加 append函数 list1 = ['noevil', 'fordearme', 'city', 'cust ...
- python--第一天总结
[变量]1.变量定义的规则: 变量名只能是 字母.数字或下划线的任意组合 变量名的第一个字符不能是数字 以下关键字不能声明为变量名 ['and', 'as', 'assert', ' ...
- log4j最中意的配置
log4j.rootLogger=DEBUG, Console, logfile log4j.appender.Console=org.apache.log4j.ConsoleAppender log ...
- 调用高德地图API(热力图)详解
具体脚本语言如下: <!doctype html> <html> <head> <meta charset="utf-8"> < ...