本文介绍了使用Mac中的终端应用程序将.p12文件转换为.pem“无此类文件或目录”错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已从Keychain Access导出Apple Development IOS推送服务证书,并将apns-dev-cert.p12保存在我的桌面上。我想启用 Apple推送通知我已按照这些博客将 apns-dev-cert.p12转换为apns-dev-cert.pem

I have export the "Apple Development IOS Push Service" certificate from Keychain Access and save the "apns-dev-cert.p12" in my desktop. I want to enable Apple Push Notification I have followed these blogs to convert apns-dev-cert.p12 to apns-dev-cert.pem from Terminal app,

http://bhaveshkumbhani.blogspot.in/2011/12/convert-p12-to-pem-for-apns.html
http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
Apple Document RemoteNotificationPG.pdf

我在终端中使用过这些命令,

I have used these commands in Terminal,

    1.V******-Ms-iMac-2:~ c*****$ openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts
        Response : Error opening input file apns-dev-cert.p12
        Certificates.p12: No such file or directory
    2.V******-Ms-iMac-2:~ c*****$ openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
        Response : Error opening input file apns-dev-cert.p12
        Certificates.p12: No such file or directory
    3.V******-Ms-iMac-2:~ c*****$ ls
            All_iOS_Applications_Document.doc   Pictures
            AppStoreSubmissionSteps.doc     Public
            Desktop                 Sites
            Documents               Softwares
            Downloads               Untitled.txt
            Dropbox                 pic
            Library                 pic.zip
            Movies                  pricelist.txt
            Music                   sms.txt
            Nana_User_Case_Documents.odt
   4. V******-Ms-iMac-2:~ c*****$ cd
   5.V******-Ms-iMac-2:~ c*****$ cd/Users/c*****/Desktop/A
-bash: cd/Users/c*****/Desktop/A: No such file or directory

我无法理解为什么终端总是说没有这样的文件或目录?我需要在我的Mac中保存.p12文件?

I can't understand why the terminal always saying "No such file or directory"?. Where i need to save the .p12 file in my Mac?

使用终端应用版本2.1.2(273.1)。 Mac OS X版本10.6.8

你能取悦我需要做什么吗?我需要使用.pem文件启用APNS。请帮帮我。提前致谢。

Can you please what i need to do? I need to enable the APNS by using the .pem file. Please help me. Thanks in advance.

编辑:

我添加了试用的Raywenderlich.com我的mac终端应用程序中的终端代码

I have added tried Raywenderlich.com termial code in my mac Terminal app

1. V******-Ms-iMac-2:~ c*****$ pwd
/Users/creagx
2. V******-Ms-iMac-2:~ c*****$ cd/ Users/creagx/Desktop/A
-bash: cd/: No such file or directory


推荐答案

输入:

cd /Users/creagx/Desktop/A (Space between cd and Slash: cd[SPACE]/Users/creagx/Desktop/A

如果桌面上有一个名为A的文件夹,其中包含p12文件。

if there is a Folder named "A" on your Desktop where the p12 files are in.

然后继续使用其他命令

openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts

openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12

这篇关于使用Mac中的终端应用程序将.p12文件转换为.pem“无此类文件或目录”错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 03:03