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

标签 ios push-notification apple-push-notifications

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

我正在点击一个链接为我的应用程序启用推送通知。当我将 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

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

最佳答案

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

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

关于ios - 在推送通知中将 CER 转换为 PEM 文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18586834/

相关文章:

ios - Int 不可转换为 DictionaryIndex<String, String>

android - 如何在 Android 上禁用 OneSignal?

android - 华为push sdk for Android target 31

ios - 从服务中获取数据 Objective c

ios - 从在设备上运行的 iOS XCTestCase 调用 OS X 代码

ios - 在 iOS 10 中未收到推送通知

ios - 如果执行,如何使用MDM进行应用程序的增删改查?

ios - 生产模式推送通知

ios - 从 Web 链接下载应用程序

ios - Azure 移动服务 - 推送通知注册不起作用 [ios]