转自: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的更多相关文章

  1. (转)苹果推送通知服务教程 Apple Push Notification Services Tutorial

    本文译自http://www.raywenderlich.com/.原文由iOS教程团队 Matthijs Hollemans 撰写,经原网站管理员授权本博翻译. 在iOS系统,考虑到手机电池电量,应 ...

  2. (转)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 ...

  3. (转)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 ...

  4. Send push notification on Apple (APNS) on c#.net

    原文: http://apns-c-sharp-net-vikram-jain.blogspot.com ======================= Please, Install your ce ...

  5. 远程通知APNs(Apple Push Notification Server)

    推送通知是由应用服务提供商发起的,通过苹果的APNs(Apple Push Notification Server)发送到应用客户端.下面是苹果官方关于推送通知的过程示意图: 推送通知的过程可以分为以 ...

  6. apple 官方文档 Push Notification Programming

    iOS Developer LibraryDeveloper Search Local and Push Notification Programming Guide PDF Table of Con ...

  7. Provider Communication with Apple Push Notification Service

    This chapter describes the interfaces that providers use for communication with Apple Push Notificat ...

  8. (转)How to build an Apple Push Notification provider server (tutorial)

    转自:https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ ...

  9. (转)在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送

    在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送 From: http://saeapns.sinaapp.com/doc.html 1,在 ...

随机推荐

  1. js进制转换

    var n = 17; var n2 = n.toString(2); var n8 = "0" + n.toString(8); var n16 = "0x" ...

  2. excel导入mssql数据库,支持excel2003--2010文件格式

    rt,简单的excel导入mssql.未做性能及海量数据优化,一般单表5000左右条数据导入适用. 源码非原创,来源于之前搜集整理,原作者无从考究,如有版权问题请留言注明. 看代码.前台页面是一个Fi ...

  3. LINQ Enumerable 续 II

    Enumerable.TakeWhile和Enumerable.SkpWhile Enumerable.TakeWhile和Enumerable.SkpWhile将通过判断条件,来获取和跳过序列. T ...

  4. 新浪微博开放平台OAuth授权解决方案(含代码)

    前几日一位朋友项目中需要使用新浪微博的接口,故和这位朋友一同研究了新浪微博开放平台上面所提供的资料,首先要使用这些接口是需要用户登录并且授权的,新浪微博开放平台其实是提供两种授权方式的,第一种是:OA ...

  5. java图片缩放

    package com.rubekid.springmvc.utils; import java.awt.AlphaComposite; import java.awt.Graphics2D; imp ...

  6. ORA-16014: 日志 1 的序列号 242 未归档, 没有可用的目的地

    SQL> alter database open; *第 1 行出现错误:ORA-16014: 日志 1 的序列号 242 未归档, 没有可用的目的地ORA-00312: 联机日志 1 线程 1 ...

  7. ubuntu11.10(TQ210)下移植boa服务器

    平台:ubuntu11.10 一.下载源码包www.boa.org   boa-0.94.13.tar.gz 二.解压,在其src目录下生产makefile #tar xvfz  boa-0.94.1 ...

  8. nginx重定向规则详细介绍

    为何要使用301重定向 在网站建设中需要网页重定向的情况很多:如网页目录结构变动,网页重命名.网页的扩展名改变.网站域名改变等.如果不做重定向,用户的收藏和搜索引擎数据库中的旧地址只能让访客得到一个4 ...

  9. Python自动化运维之10、模块之json、pickle、XML、PyYAML、configparser、shutil

    序列化 Python中用于序列化的两个模块 json     用于[字符串]和 [python基本数据类型] 间进行转换 pickle   用于[python特有的类型] 和 [python基本数据类 ...

  10. GET异步 请求图片步骤

    - (IBAction)getImage:(id)sender { //1,准备URL NSString *str = @"http://e.hiphotos.baidu.com/image ...