如何知道.pem文件是否正确

发布于 2024-09-12 02:20:29 字数 256 浏览 4 评论 0原文

我创建了一个 .pem 文件用于生产推送通知,

并上传到服务器中。

但是当发送推送通知时,它会给出这样的错误。

$fp =stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);不起作用,返回失败。

这是什么错误,如何解决。

最后,如何知道.pem文件是否正确

I have created a .pem file to be used for Production push notification,

and uploaded in server.

But when sending push notification, it is giving error like this.

$fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx); not working, return failed.

what is this error, how to solve it.

Finally, how to know whether the .pem file is correct or not

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

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

发布评论

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

评论(1

咋地 2024-09-19 02:20:29

您可以使用 GnuTLS 二进制文件中的“certtool”来验证证书 (certtool -i --infile cert.pem)。 Windows 二进制文件也可用

对于您的 stream_socket_client 问题,我没有答案。确保上下文初始化正确,

You could use "certtool" from the GnuTLS binaries to validate the certificate (certtool -i --infile cert.pem). Windows binaries are also available.

I don't have an answer for your stream_socket_client problem. Make sure the context is initialized correctly, an example is shown in the documentation.

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