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 ...
随机推荐
- PS-Lite源码分析
PS-Lite源码分析 http://blog.csdn.net/kangroger/article/details/73307685
- react学习入门
先在在学习react,react是faceBook推出的框架,因为虚拟DOM使页面性能提高很大,特别react Native非常适合移动端,现做一个学习总结: 1.react 获取DOM的两种方式是R ...
- Trustin Lee
Trustin Lee,MINA.Netty2通讯框架的作者韩国人,80年出生,8岁起在MSX迷你计算机上编写BASIC程序,爱好游戏编程以及使用汇编.C和C++解决编程问题,1998年获得韩国信息奥 ...
- cdnbest如何查看站点操作日志(同步日志)
1. 在区域列表点同步日志 2. 点击进入后,可以查看对哪个站点进行了操作,操作时间,ip,id都有记录 3. 想知道详细操作了什么内容把鼠标指向操作类型,就会弹出操作的信息
- .net 代理类(WebService代理类的详解 )
http://hi.baidu.com/654085966/item/53ee8c0f108ad78202ce1b1d -----------转自 客户端调用Web Service的方式我现在知道 ...
- thymeleaf 获取sessionid
参考https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html ${#session.id}
- 织梦 百度sitemap制作教程
一.新建一个sitemap.htm模板 登录dedecms后台,选择[模板]-[模板管理]-[默认模板管理] 点击最下面的[新建模板]新建一个模板,并复制下面这段代码进去(将代码中的域名改为自己的): ...
- centos7.2 +cloudstack 4.11 +KVM +ceph 安装配置(网卡带聚合)
系统安装,注意:管理节点版本是有要求的,配置为centos 7.2 最小安装版本(非最小化安装). 系统分区要求 /boot/efi 200MB / 100G /var 100G swap 0 其它给 ...
- Docker 网络不通的解决方法
表现是: docker主机内部网络正常,与其它主机的连接失效,其它主机不能连接docker主机上映射的端口,docker内部也无法连接外部主机. 执行docker info,可以看到一些警告. 可在不 ...
- CentOS NFS服务器的搭建与配置
1.查看系统是否已安装NFS [root@bogon ~]# rpm -qa | grep nfs [root@bogon ~]# rpm -qa | grep rpcbind 2.安装NFS [ro ...