为 APNS 创建 .pem 文件? [英] Creating .pem file for APNS?

查看:41
本文介绍了为 APNS 创建 .pem 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 APN 负载数据创建一个 .pem 文件以存储在托管服务器中?

How do I create a .pem file to be stored in the hosting server for APN payload data?

推荐答案

这是我所做的,来自:blog.boxedice.com 和 Joe Pezzillo 的iPhone 高级项目"第 10 章.

Here is what I did, From:blog.boxedice.com and "iPhone Advanced Projects" chapter 10 byJoe Pezzillo.

使用钥匙串中的 aps_developer_identity.cer:

With the aps_developer_identity.cer in the keychain:

  1. 从本地 Mac 和登录钥匙串启动钥匙串访问,按证书类别过滤.您将看到一个名为Apple Development Push Services"的可扩展选项
  2. 右键单击Apple Development Push Services"> 导出Apple Development Push Services ID123".将此文件另存为 apns-dev-cert.p12 文件,以便您可以访问它.无需输入密码.
  3. 下一个命令在 Mac 的终端中为 PEM 格式(隐私增强邮件安全证书)生成证书:

  1. Launch Keychain Access 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"
  2. Right click on "Apple Development Push Services" > Export "Apple Development Push Services ID123″. Save this as apns-dev-cert.p12 file somewhere you can access it. There is no need to enter a password.
  3. The next command generates the cert in Mac’s Terminal for PEM format (Privacy Enhanced Mail Security Certificate):

openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts

在服务器上使用 chmod 400 设置这个未加密密钥的文件权限.

On the server set the file permission of this unencrypted key by using chmod 400.

这篇关于为 APNS 创建 .pem 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆