(转)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’s coming up to a year since we launch our server monitoring iPhone application and so our Apple push notification SSL certificate is expiring in a few weeks. It is necessary to renew it and install the new certificate on our servers so we can continue sending push notifications for server alerts, and this quick post will take you through the steps.
You can generate a new certificate without revoking the old one, and use them simultaneously to ensure they are working before revoking the old one.
1) Log in
Log into the Apple iPhone Developer website and click the iPhone Provisioning Portal link. From the left menu, click on App IDs and then Configure next to the app you want to regenerate the certificate for. You’ll see your existing certificates and the option to generate a new one. Click the Configure button to launch the wizard.
2) Generate a CSR
I used the CSR I generated for the original APNS certificate but you can generate a new one by following the instructions in the wizard.
3) Generate the certificate
After uploading the CSR, the wizard will generate your new certificate. The name will show up as your username rather than what you specify in the CSR. Download it to your system, it will be called aps_production_identity.cer. Double click it to import it into your Keychain.
4. Export certificates / keys
Launch Keychain Assistant from your local Mac and from the login keychain, filter by the Certificates category. You will see an expandable option called “Apple Development Push Services”. You’ll see your old certificate and the new one you just downloaded.
Click the triangle to expand the certificate. You’ll have 2 items – the certificate itself that you just expanded, and the private key that was revealed.
Right click on the certificate (not the private key) “Apple Development Push Services” > Export “Apple Development Push Services ID123″. Save this as apns-prod-cert.p12 file somewhere you can access it. Then do the same with the private key and save it as apns-prod-key.p12.
For both exports, you will be asked to specify a password, then asked for your keychain password. I did not specify a password on the first prompt.
5) Convert to PEM format
These files now need to be converted to the PEM format by executing these 2 commands from the terminal:
1
2
|
openssl pkcs12 -clcerts -nokeys -out apns-prod-cert.pem - in apns-prod-cert.p12 openssl pkcs12 -nocerts -out apns-prod-key.pem - in apns-prod-key.p12 |
You will be forced to set a PEM passphrase on the second command, so execute the following command to remove it:
1
|
openssl rsa - in apns-prod-key.pem -out apns-prod-key-noenc.pem |
6) Merge files
Finally, you need to combine the key and cert files into a apns-prod.pem file we will use when connecting to APNS:
1
|
cat apns-prod-cert.pem apns-prod-key-noenc.pem > apns-prod.pem |
And that’s it. You can replace your existing production certificate with the one you just created, and it’ll be valid for another year. Yay.
(转)How to renew your Apple Push Notification Push SSL Certificate的更多相关文章
- (转)苹果推送通知服务教程 Apple Push Notification Services Tutorial
本文译自http://www.raywenderlich.com/.原文由iOS教程团队 Matthijs Hollemans 撰写,经原网站管理员授权本博翻译. 在iOS系统,考虑到手机电池电量,应 ...
- (转)Apple Push Notification Services in iOS 6 Tutorial: Part 2/2
转自:http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2 Upda ...
- (转)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 ...
- Send push notification on Apple (APNS) on c#.net
原文: http://apns-c-sharp-net-vikram-jain.blogspot.com ======================= Please, Install your ce ...
- 远程通知APNs(Apple Push Notification Server)
推送通知是由应用服务提供商发起的,通过苹果的APNs(Apple Push Notification Server)发送到应用客户端.下面是苹果官方关于推送通知的过程示意图: 推送通知的过程可以分为以 ...
- apple 官方文档 Push Notification Programming
iOS Developer LibraryDeveloper Search Local and Push Notification Programming Guide PDF Table of Con ...
- Provider Communication with Apple Push Notification Service
This chapter describes the interfaces that providers use for communication with Apple Push Notificat ...
- (转)How to build an Apple Push Notification provider server (tutorial)
转自:https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ ...
- (转)在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送
在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送 From: http://saeapns.sinaapp.com/doc.html 1,在 ...
随机推荐
- memcache和memcached
一:Memcached.memcached.memcache. 其中首字母大写的Memcached,指的是Memcached服务器,就是独立运行Memcached的后台服务器,用于存储数据的“数据库” ...
- NuGet学习笔记(1)——初识NuGet及快速安装使用(转)
关于NuGet园子里已经有不少介绍及使用经验,本文仅作为自己研究学习NuGet一个记录. 初次认识NuGet是在去年把项目升级为MVC3的时候,当时看到工具菜单多一项Library Package M ...
- NYOJ737
题意:给n堆石子,按照顺序排列,只能相邻两堆石子合并,求最后合并为一堆时所花费的最小代价,石子合并代价为两堆石子之和. 输入: n(石子堆数) Xi(每堆石子个数) 输出: T(最小代价) 思路:经典 ...
- mysql的perror
eg: 执行:perror 1064 返回:MySQL error code 1064 (ER_PARSE_ERROR): %s near '%-.80s' at line %d ...
- 1201.1——Vim编辑器的相关操作
一 vi的操作模式 vi提供两种操作模式:输入模式(insert mode)和指令模式(command mode).在输入模式下,用户可输入文本资料.在指令模式下,可进行删除.修改等各种编辑动作. 在 ...
- JavaScript 客户端JavaScript之 脚本化浏览器窗口
1.计时器 客户端Javascript以全局函数setTimeOut().clearTimeOut().setInterval().clearInterval()提供这一功能. 前者是从运行的那一 ...
- php访问方法外变量
class Capture { private static $_CapSite = 222; function dd() { echo self::$_CapSite; } } $cc=new Ca ...
- THINK PHP U的用法
public function index(){ //$db=new \Think\Model(); //$db=M('msg'); //$result=$db->query("sel ...
- phpcms v9联动菜单实现筛选
<!--初始化init--> {php $theurl = "index.php?m=content&c=index&a=lists&catid=$cat ...
- 自己动手开发编译器(五)miniSharp语言的词法分析器
稍微说明一点,整型常量和上面的标识符的词法,在调用lex.DefineToken时都多传了一个参数.这个参数是可选的描述信息,如果不传会直接使用正则表达式的字符串形式.而标识符的正则表达式有4万多个字 ...