在推送通知中将CER转换为PEM文件时出错

时间:2013-09-03 07:47:51

标签: ios push-notification apple-push-notifications

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

我正在关注ablove链接以启用我的app的推送通知。当我将cer文件转换为pem文件时出现错误

system17:~ sairam$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem

Error opening Certificate aps_development.cer
2383:error:02001002:system library:fopen:No such file or directory:/SourceCache/OpenSSL098/OpenSSL098-35.2/src/crypto/bio/bss_file.c:356:fopen('aps_development.cer','r')
2383:error:20074002:BIO routines:FILE_CTRL:system lib:/SourceCache/OpenSSL098/OpenSSL098-35.2/src/crypto/bio/bss_file.c:358:
unable to load certificate

任何帮助将不胜感激。谢谢提前

2 个答案:

答案 0 :(得分:10)

您从主目录调用“openssl”命令,但证书文件位于 您的桌面目录。所以你必须先改变到那个目录:

$ cd Desktop
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem

答案 1 :(得分:0)

$ cd ~/Desktop
$ openssl pkcs12 -in WenderCastPush.p12 -out WenderCastPush.pem -nodes -clcerts