Apple Push Notifications,如何正确导出我的证书? [英] Apple Push Notifications, how do I properly export my cert?

查看:61
本文介绍了Apple Push Notifications,如何正确导出我的证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎不知道如何正确导出我的证书,以便在我的 iOS 应用程序中使用推送通知.我正在使用以下证书,从 iOS Provisioning PortalCertificates 部分下载.

然后,我将按照我在网上找到的众多教程之一进行操作,顺便说一下,将我的证书转换为 .pem 格式,以便在 中使用>

  • http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/
  • http://code.google.com/p/apns-sharp/wiki/HowToCreatePKCS12Certificate
  • http://wiki.cs.unh.edu/wiki/index.php/Using_the_Apple_Push_Notification_Service
  • 这些解决方案没有一个有效.当我尝试使用 ruby​​-apns 时,我正坐在这里从控制台查看以下错误:

    读完 A: sslv3 alert certificate unknown (OpenSSL::SSL::SSLError)

    基本上我发现的所有其他服务器解决方案都告诉我我的证书不正确或者它也有问题.

    我做错了吗?

    =================================

    隔夜礼貌凹凸隐身编辑

    所以昨晚我把头撞在墙上,实际上是看到了 Apple 自己的说明.几乎是一模一样的,我也试过了.尽管如此,这是来自 这个链接:

    openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes

    解决方案

    (1) 首先你需要设置你的app ID的配置来开启推送通知服务.您可以检查图像.

    (2) 然后您可以在您的机器上的钥匙串中安装证书并安装.

    (3) 这里您要导出两个文件.取而代之的是,您只需要导出私钥,如屏幕截图所示.

    (4) 现在您可以导出私钥并以 .p12 格式以您想要的任何名称存储,如下面的屏幕截图所示.

    (5) 然后按照您上面提到的所有其他您非常熟悉的步骤进行操作.

    openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes

    如果您仍有任何问题或无法解决,请告诉我.

    I can't seem to figure out how to properly export my cert for use in my iOS app with push notifications. I'm using the following cert, downloaded from the Certificates section of the iOS Provisioning Portal.

    I'm then following one of the many tutorials I've found all over the web that are all different by the way, to get my cert into a .pem format for use in ruby-apns.

    First I export it from the Keychain:

    After I give it a name and a password I perform the following commands in the terminal*:

    openssl pkcs12 -in cert.p12 -out apple_push_notification_dev.pem -nodes -clcerts
    

    *note: this isn't the only way I've tried this, just the latest, I have also tried via the instructions at the following urls:

    Not a single one of these solutions work. I'm sitting here looking at the following error from the console when I try to use ruby-apns:

    read finished A: sslv3 alert certificate unknown (OpenSSL::SSL::SSLError)
    

    And essentially every other server solution I've found has told me my certificate is incorrect or that there's a problem with it as well.

    Am I doing this wrong?

    ===============================

    Overnight Courtesy Bump Stealth Edit

    So I beat my head against the wall last night, and actually came across Apple's own instructions for doing this. It's almost the exact same, and I tried it to the same tune. Nevertheless, here is the latest attempt from this link:

    openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes
    

    解决方案

    (1) First you need to set the configuration for your app ID to enable push notification service. You can check in the image.

    (2) Then You can install the certificate and intall in your keychain in your machine.

    (3) Here you are exporting two files. Instead of that you just need to export the private key as shown in the screenshot.

    (4) Now you can export the private key and store with any name you want in .p12 format as shown in the screenshot below.

    (5) Then follows all other steps as you know very well like you mentioned above.

    openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes
    

    Please let me know if you still have any question or if you are not able to solve then let me know.

    这篇关于Apple Push Notifications,如何正确导出我的证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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