简体   繁体   English

在Mac中使用终端应用程序将.p12文件转换为.pem。“没有此类文件或目录”错误?

[英]Convert .p12 file to .pem using Terminal app in Mac “No such file or directory” error?

I have export the "Apple Development IOS Push Service" certificate from Keychain Access and save the "apns-dev-cert.p12" in my desktop. 我已经从钥匙串访问中导出了“ Apple Development IOS推送服务”证书,并将“ apns-dev-cert.p12”保存在桌面中。 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, 我想启用Apple Push Notification我已关注这些博客将Terminal应用程序中的apns-dev-cert.p12 to apns-dev-cert.pem转换apns-dev-cert.p12 to apns-dev-cert.pem

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

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? 我需要在Mac上保存.p12文件的位置?

Am using Terminal app Version 2.1.2 (273.1). Mac OS X version 10.6.8 我正在使用Terminal app Version 2.1.2 (273.1). Mac OS X version 10.6.8 Terminal app Version 2.1.2 (273.1). Mac OS X version 10.6.8 . Terminal app Version 2.1.2 (273.1). Mac OS X version 10.6.8

Can you please what i need to do? 你能满足我的需要吗? I need to enable the APNS by using the .pem file. 我需要使用.pem文件启用APNS。 Please help me. 请帮我。 Thanks in advance. 提前致谢。

EDIT: 编辑:

I have added tried Raywenderlich.com termial code in my mac Terminal app 我在Mac Terminal应用程序中添加了尝试过的Raywenderlich.com终端代码

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

Type in: 输入:

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

if there is a Folder named "A" on your Desktop where the p12 files are in. 如果桌面上有一个名为“ A”的文件夹,其中有p12文件。

Then go on with the other Commands 然后继续执行其他命令

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM