Apple推送通知分发证书签名请求是否需要与用于签署应用程序的分发证书相同? [英] Does the apple push notification distribution certificate signing request need to be the same as that used for the distribution cert to sign the app?

查看:130
本文介绍了Apple推送通知分发证书签名请求是否需要与用于签署应用程序的分发证书相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已创建的现有应用,我最近配置了推送通知。

I have an existing app that I have created, and I have recently configured push notifications.

配置时,系统会要求我上传证书签名请求(CSR)。我不再拥有用于发布应用程序的原始CSR。这是我需要上传到推送通知配置以接收我的推送通知证书的CSR吗?

When configuring, I am asked to upload a certificate signing request (CSR). I no longer have the original CSR that I used to publish my app. Is this the CSR I need to upload to the push notification configuration to receive my push notification certificate?

我的分发证书上有私钥可用。

I have my distribution cert with private key available.

我试图创建一个新的CSR来上传到开发人员门户以检索我的推送通知证书。

I have tried to create a new CSR to upload to the developer portal to retrieve my push notification certificate.

当我将此文件与我的私钥(p12文件)合并并尝试连接到推送通知服务器时,我收到以下错误:

When I combine this file with my private key (p12 file) and attempt to connect to the push notification server I get the following error:

错误设置私钥
42600:错误:0B080074:x509证书例程:X509_check_private_key:键值不匹配:/SourceCache/OpenSSL098/OpenSSL098-44/src/crypto/x509/x509_cmp.c :406:

error setting private key 42600:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:/SourceCache/OpenSSL098/OpenSSL098-44/src/crypto/x509/x509_cmp.c:406:

这是否因为我用来创建推送通知证书的新CSR而发生?

Is this happening because of the new CSR I used to create the push notification cert?

推荐答案

生成新的CSR非常好。您的.p12文件中只有错误的私钥。

it's perfectly fine to generate a new CSR. You just have the wrong private key in your .p12 file.

生成推送证书,然后从Apple下载并双击它以将其添加到您的钥匙串。

Generate the push certificate, then download it from Apple and double-click it to add it to your Keychain.

打开钥匙串访问权限,在我的证书中找到推送证书,然后展开它。您应该看到下面的私钥,这是该证书的正确密钥。选择证书及其私钥,右键单击并选择导出2个项目...。

Open Keychain access, find the Push Certificate in "My Certificates", and expand it. You should see a private key underneath, that's the right one for this certificate. Select both the certificate and its private key, right click and select "Export 2 items…".

使用生成的.p12文件,一切都可以正常工作。

With the resulting .p12 file, everything should work fine.

这篇关于Apple推送通知分发证书签名请求是否需要与用于签署应用程序的分发证书相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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