Apple 推送通知错误/SSL 错误 20

发布于 2024-12-27 10:41:48 字数 502 浏览 1 评论 0原文

我在尝试使用 Apple 推送通知服务验证 SSL 证书时遇到问题。我按照 iOS 开发人员网站上的所有说明进行操作(创建新的配置文件、创建新的应用程序 ID、创建证书签名请求、下载 apns .cer 文件等)。

然后,按照在线教程,我将 .p12 文件转换为 .pem 文件,将 .cer 文件转换为 .pem 文件,以便尝试验证证书。

这是我在终端中发送的请求:

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MyCert.pem -key MyKey.pem

它询问我的密码,我给了它,它接受了。然后它返回了很多内容,最后带有以下简介:

验证返回代码:20(无法获取本地颁发者证书)

我在网上进行了广泛搜索,发现了一些似乎相关的内容,但是这些都没有帮助我。我也尝试重新启动整个过程,最终得到了相同的结果。

非常感谢任何帮助。

I'm having an issue when trying to verify my SSL certificate with Apple Push Notification Services. I followed all the instructions on the iOS developer site (creating the new provisioning profile, creating the new App ID, creating the certificate signing request, downloading the apns .cer file, etc).

Then, following a tutorial online, I converted my .p12 file into a .pem file, and my .cer file to a .pem file, in order to try to verify the certificates.

Here is the request I sent in the terminal:

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MyCert.pem -key MyKey.pem

It asked for my passphrase, which I gave it and it accepted. It then returned a lot of stuff with the following blurb at the end:

Verify return code: 20 (unable to get local issuer certificate)

I searched extensively online, and found a few things that seemed relevant, but none of which helped me. I also tried restarting the whole process, and ended up with the same result.

Any help is much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝咒 2025-01-03 10:41:48

这是由于命令

openssl s_client -connect gateway.sandbox.push.apple.com:2195 中的空间所致
-cert PushChatCert.pem -key PushChatKey.pem

改为使用

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem

有趣但真实且令人尴尬,当您只是从站点命令..

It is due to space you have in your command

openssl s_client -connect gateway.sandbox.push.apple.com:2195
-cert PushChatCert.pem -key PushChatKey.pem

instead use

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem

Funny but true and embarassing when you just copy and paste from the site the command..

浅唱ヾ落雨殇 2025-01-03 10:41:48

您似乎不信任颁发 APNS 证书的根证书。
要与 APN 建立 TLS 会话,必须在提供商的服务器上安装 Entrust Secure CA 根证书。

查看本地和推送通知编程指南了解更多详细信息。

It looks like you didn't trust the root certificate issuing your APNS certificate.
To establish a TLS session with APNs, the Entrust Secure CA root certificate must be installed on the provider’s server.

Have a look at the Local and Push Notification Programming Guide for more details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文