首页 > iOS消息推送的证书问题

iOS消息推送的证书问题

我在做iOS消息推送功能,看了网上的一些教程,说需要导出密钥和证书文件转化成自己服务器可以使用的证书,但我使用openssl pkcs12 -export -in apn_developer_identity.pem -inkey private_key_noenc.pem -certfile Push.certSigningRequest -name "apn_developer_identity" -out apn_developer_identity.p12的时候,命令行提示unable to load certificates,重试了很多次,但依然会遇到这个问题,也没找到合适的答案。


我后来发现当把这个命令中的-certfile Push.certSigningRequest部分去掉后就不会报错了,而且也不影响服务器使用。


LZ自己看吧

推送相关信息

http://www.devdiv.com/iOS_iPhone-_ios_push_-thread-130543-1-1.html
http://www.easyapns.com/apple-delegate
https://developer.apple.com/account/ios/certificate/certificateList.action?type=distribution

转换PEM命令

openssl pkcs12 -clcerts -nokeys -out cert.pem -in aps_development.p12   
openssl pkcs12 -nocerts -out key.pem -in aps_development.p12   
openssl rsa -in key.pem -out key.unencrypted.pem   
cat cert.pem key.unencrypted.pem > push.pem 

测试地址gateway.sandbox.push.apple.com:2195 
 
发布地址 gateway.push.apple.com:2195


http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

【热门文章】
【热门文章】