开发者

Need help to create an identity from APNS' der certificate

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:

Need help to create an identity from APNS' der certificate

which is unacceptable for a deamon se开发者_如何学JAVArvice.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜