需要帮助从 APNS 创建身份证书
我正在尝试在 Mac OS X 10.6 环境的 objC 中实现我自己的 ApplePushNotification 提供程序(deamon)。作为基础,我采用了 PushMeBaby 代码,但我必须进行一些修改才能在没有 UI 交互的情况下使用它。
原始实现假设私钥仅存在于钥匙串中,这对于非 ui 可执行文件来说是一个问题。当我的应用程序想要获取私钥时,系统会通过以下对话框阻止它:
这是不可接受的守护进程服务。
我想使用 p12 证书,但 10.6 没有实现 SecPKCS12Import 。
有没有办法显式地为私钥创建 SecKeyRef 对象?或者使用PEM证书?任何其他建议将不胜感激。
更新: 一位来自德国的聪明人设法仅使用 openSSL 库来实现: https://github.com/rbartolome/APNSConnection/blob/master/ APNSConnection.m#L42
我还没有尝试过,但看起来很棒。
I am trying to implement my own ApplePushNotification provider (deamon) in objC for Mac OS X 10.6 environment. As a basis I took PushMeBaby code, but I have to make some modification on order to use it without UI interactions.
The original implementation assumes that private key exists only within a keychain, which is a problematic for non-ui executable. When my app wants to grab a private key the system blocks it with the following dialog:
which is unacceptable for a deamon service.
I wanted to use p12 certificates, but 10.6 does not have SecPKCS12Import
implemented.
Is there a way to create a SecKeyRef
object for a private key explicitly? Or use PEM certificates? any other suggestions would be highly appreciated.
Update:
One clever dude from Germany managed to implement using only openSSL library:
https://github.com/rbartolome/APNSConnection/blob/master/APNSConnection.m#L42
I didn't try it yet but looks awesome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论