简体   繁体   English

Safari推送通知证书问题

[英]Safari push notifications certificate issue

I have a website which uses push notifications for safari browser. 我有一个网站,该网站使用野生动物园浏览器的推送通知。 It worked fine until recently when I started to receive a message saying 直到最近我开始收到一条消息说,它运行良好

Signature verification of push package failed 推包签名验证失败

I believe that it is connected with the recent Apple WWDRCA certificate expiration and now trying to install their new certificate into the system. 我认为它与最近的Apple WWDRCA证书到期有关,现在正在尝试将其新证书安装到系统中。 Their docs say that 他们的文档说

If you were using the openssl_pkcs7_sign function to sign your push package with only your web push certificate, you should pass the path to the renewed intermediate for the extra certificates parameter. 如果您使用openssl_pkcs7_sign函数仅使用Web推送证书来对推送包进行签名,则应将路径传递给额外证书参数的更新中间件。

So my question is how to tell this function to use this new certificate, and another one, should I install their certificate into my linux system which is running Apache. 因此,我的问题是如何告诉此功能使用此新证书,以及另一个问题,是否应将其证书安装到运行Apache的linux系统中。 I am not sure if I had a previous certificate installed in it. 我不确定是否安装了以前的证书。 Thank You 谢谢

Thanks everyone, 感谢大家,

managed to solve the issue by adding Apple WWDRCA new certificate as a last parameter to openssl_pkcs7_sign 通过将Apple WWDRCA新证书添加为openssl_pkcs7_sign的最后一个参数来设法解决了该问题

openssl_pkcs7_sign("$package_dir/manifest.json", $signature_path, $cert_data, $private_key, array(), PKCS7_BINARY | PKCS7_DETACHED,"/path/to/certificate/AppleWWDRCA.pem");

No additional work required. 无需其他工作。 Note that the file must be converted from .cer to .pem manually. 请注意,必须手动将文件从.cer转换为.pem。

I think this should be pointed out somewhere in docs more clearly. 我认为应该在文档中更清楚地指出这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM